editor reverse line bet

Barry Shein bzs at bu-cs.BU.EDU
Tue Oct 14 06:10:21 AEST 1986


Ok, time to be obnoxious.

This is unix-wizards. We use all editors; ed, ex, vi, emacs, sed, awk,
cat > file, whatever we have put on the system. We wouldn't try to
build a command file out of an 'ls > file' with anything but ed or vi
(maybe awk or sed, same thing basically) we wouldn't try to write an
editor based mail interface in anything but an emacs.  We also use
probably a half-dozen programming languages and a dozen or more
utilities regularly in the course of our work, others when called for,
without pausing to ponder whether we find m4 more pleasant than yacc
(unless we have the urge to rewrite one or the other) For changing a
few chars in a file it takes us about 1/10th of a second to decide
whether to type in 'emacs foo' or 'ed foo' or 'vi foo' or whatever
will do the job the fastest.

Emacs has its advantages in being a completely programmable editor, vi
has its advantage in line-oriented regular expression substitution
that just doesn't seem to fit into emacs well as simple commands (I
know, you can do ANYTHING in emacs, but when I want to say something
like '1,$s/.*/mv & \/usr\/lib\/new\/&/' I find vi/ed trivial and emacs
opaque.) We have also noted that ed and vi load much faster than
emacs.  On my workstation I use emacs a lot, on the student 750
running at a load of 25 or more I always use ed or vi.

We consider changing editors in the middle of an edit to just be
another editor command (^X^S M-X Kill-Buffer ^Z ed foo 1,$s/^/>/ w q
%emacs ^X^F foo). That is why we made it so easy to do.

Besides, for us vi IS a programmable editor. We have the sources :-)

Most importantly, we don't waste our time arguing over whether it is
better to do all carpentry with either a hammer or a screwdriver, we
make sure both are in our toolbox if we can help it. If not we
recognize it's an inferior situation but will get the job done anyhow
with little trouble.

But what about the users who will only learn one editor? Wait a
minute, I thought this was UNIX-WIZARDS?!

	-Barry Shein, Boston University



More information about the Comp.unix.wizards mailing list