home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeLearning the vi EditorSearch this book

E.3. Tastes Great, Less Filling

We can't discuss vi as part of UNIX culture without acknowledging what is perhaps the longest running debate in the UNIX community,[67] vi versus emacs.

[67]OK, it's really a religious war, but we're trying to be nice. (The other religious war, BSD vs. System V, was settled by POSIX. System V won, although BSD received significant concessions. Figure )

Discussions about which is better have cropped up on comp.editors (and other newsgroups) for years and years. You will find summaries of some of these discussions in the ftp archives described above. You will find pointers to more recent versions on the web pages.

Some of the better arguments in favor of vi are:

  • vi is available on every UNIX system. If you are installing systems, or moving from system to system, you might have to use vi anyway.

  • You can usually keep your fingers on the home row of the keyboard. This is a big plus for touch typists.

  • Commands are one (or sometimes two) regular characters; they are much easier to type than the all of the control- and meta-characters that emacs requires.

  • vi is generally smaller and less resource intensive than emacs. Startup times are appreciably faster, sometimes up to a factor of 10.

  • Now that the vi clones have added features like incremental searching, multiple windows and buffers, GUI interfaces, syntax highlighting and smart indenting, and programmability via extension languages, the functional gap between the two editors has narrowed significantly, if not disappeared entirely.

To be complete, two more items should be mentioned. First, there are actually two versions of emacs that are popular: the original GNU emacs, and xemacs, which is derived from an earlier version of GNU emacs. Both have advantages and disadvantages, and their own sets of devotees.[68]

[68]Who undoubtedly share a joint distaste for vi! Figure

Second, while GNU emacs has always had vi-emulation packages, until recently, they have not been very good. This has changed. The "viper mode" is reputed to be an excellent vi emulation. It can serve as a bridge for learning emacs for those who are interested in doing so.

To conclude, always remember that you are the final judge of a program's utility. You should use the tools that make you the most productive, and for many tasks, vi and its clones are excellent tools.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.