[Sussex] Vi?

Steve Dobson steve at dobson.org
Mon Jul 26 10:37:36 UTC 2004


Hi Angelo

On Mon, Jul 26, 2004 at 09:48:48AM +0100, Jon Fautley wrote:
> Angelo Servini wrote:
> 
> >Which is better, Vi or Emacs?
> 
> Vi, of course. (Actually, I like VIM as it has nice pretty colours :) )
>
> VI is nice, small, quick to load, and almost always on rescue disks and 
> the like. Emacs, on the other hand, is a huge bloated editor, that has 
> various nice features (there's nothing you can't do in emacs) but is far 
> too complex if you just want a simple editor (imo)
> 
> I'd say, learn whatever makes you feel comfortable - just make sure that 
> VI is in there somewhere :)

Jon has a point but he is not wholly correct.

The *true* answer to your question is learn BOTH, and learn ex and sed too.

[X]Emacs is a powerful editor, and it will do just about anything you want
it to: edit documents, surf the web, read and send e-mails, compile, run and
debug you programs... So [X]Emacs is more than just an editor, it is a
complete environment.

vi on the other hand is much lighter and quicker to get into the power
commands.  In many ways it is the more Unix-like of the too and if you
are learning the shell, I would recommend this first, although many find
the switching between edit mode and command mode awkward.

For me vi is the better editor because most most of the commands are only
one or two key presses away ([X]Emacs uses a lot more to do the same
task).

But don't ignore ex and sed.  ex is line-oriented text edit, and will 
work even when vi will not (because of problems with the terminal 
configuration - you're not as likely to see this on Linux as you are
on Solaris, HP-UX, ...).  sed is a stream editor, and I find very useful
when it comes to edit the output of other shell programs (like ps), or 
log files where there is a repetitive structure.

I find that I am more likely to use XEmacs when it comes to editing 
program files, and other highly structure documents (like HTML).  But
for every day use, and for editing config files, it is vi every time.

Steve




More information about the Sussex mailing list