Tuesday, August 17, 2010

Editing in Unix

People have been debating for DECADES for the better editor on Unix: vi or Emacs?
WYSIWYG is for losers. In Unix we deal with text.

vi has arcane and strange commands, but users love it. The fact that they can use their cursors without leaving the home keys already give them endless praise. (Hitting Esc to the command mode although requires going out of the home keys never bothers anyone).

Emacs is a bit more intuitive but still wacky. Experts do all sorts of LISP things to tweak Emacs the way they want it.

NO other innovation is ever needed, after decades and decades. vi and Emacs are here to stay.

Perhaps you like Emacs more? Waita minute, emacs may not be installed on your system. But vi will always be there. So if you work in Unix, you need to learn vi. Face it.

Here is how to search in Emacs: Ctrl-S. Intuitive enough for me.
Here is how to search in vi: forward slash /, huh?

Let's say you are an emacs users and forced to use vi but did Ctrl-S.

Here is the result: instant FREEZE spell on your terminal!

Reason: it stands for suspend or something.

To fix: darn, close the terminal and try again, or the magic de-spell keystroke: Ctrl-Q.

Sorry, Unix users MUST give in to vi.

1 comment:

Alex Mak said...

To appreciate "vi," is to know its roots in "ed."

Look, terminals used to allow editing one one, now we can do full screen!

With that perspective, vi is amazingly innovative.

Today's computer users step foot in computing with the PC (not seen a dumb terminal), so some people will never be able to grasp the elegance and pure power of vi.

emacs is fine, I used emacs in my entire undergrad years. I now use vi, even on the pc.