On Sun, 3 Jun 2012 02:33:19 +0100 Connor Lane Smith <[email protected]> wrote:
> Hey, > > On 3 June 2012 02:12, Ethan Grammatikidis <[email protected]> wrote: > > On a related note, what is the point of multi-file editors? I can see > > their use with a primitive OS, but given ed and a shell with loops... > > well I'd like to see what remains easier in a multi-file editor. > > Don't sam's X and Y commands demonstrate the usefulness of a > multi-file editor? No. They precisely are a case of looping ed, or to be more exact, looping sam -d. The regexp matches only the name, exactly as the glob in for(f in <glob>). If you really want a regexp to match file names in the shell you have `{ls | grep <re>}. > You may be able to approximate them by looping eds, > but that way you lose most of the benefits anyway. Like display > editing, and undo. The X and Y commands are not display editing. I think you have a point with undo, but I'm ambivalent about it. Undoing the results of an X or Y command undoes the change in every file. There's no reviewing each change individually, as you could if your loop made backup files for example, or if you used a versioning system. You could of course use a versioning system before running the X or Y loop in your editor, but what I'm saying is using those commands puts a great big block in your undo history. You could goof quite badly by undoing one file too far and then saving and closing others, for example, and *that* leads me strongly to the opinion that I'd rather throw away my undo history than be caught out in such a way. The more I think about the issues multi-file editing brings to undo the less I like it. That's two reasons I have to dislike multi-file editors now, the other being putting a window system in the editor instead of putting the editor in a window (and operating) system. -- This is obviously some strange usage of the word "simple" that I was previously unaware of.
