Monday, November 22, 2010

Editor's War

Editor war is the common name for the rivalry between users of the vi and Emacs text editors. The rivalry has become a lasting part of hacker culture and the free software community.
Many flame wars have been fought between groups insisting that their editor of choice is the paragon of editing perfection, and insulting the others. Unlike the related battles over operating systems, programming languages, and even source code indent style, choice of editor usually only affects oneself.

Contents

  • 1 Differences between vi and Emacs
    • 1.1 Benefits of vi-like editors
    • 1.2 Benefits of Emacs
  • 2 Humour
  • 3 Current state of the editor war
  • 4 References
  • 5 External links

Differences between vi and Emacs

The most important differences between vi and Emacs are presented in the following table:

vi Emacs
Keystroke execution vi editing retains each permutation of typed keys. This creates a path in the decision tree which unambiguously identifies any command. Emacs commands are a combination of typed keys executed immediately, which leaves the user with the choice of whether or not to use a command.
Memory usage and customizability Historically, vi is a smaller and faster program, with a more limited capacity for customization. Emacs takes longer to start up and requires more memory. However, it is highly customizable and includes a large number of features, as it is essentially an execution environment for a Lisp program designed for text-editing.
User environment vi was exclusively used inside of a text-mode console, offering no graphical user interface (GUI). Most modern vi derivatives, e.g. MacVim and gVim, include full-featured GUIs. Emacs, while initially designed for use on a console, grew a GUI fairly early on. Modern versions of both provide various GUIs.
Function/navigation interface vi uses distinct editing modes. Emacs uses metakey chords.

Benefits of vi-like editors

  • Follows a "composition of simple tools" philosophy.
  • Small in size and compatible with the Unix philosophy of "do one thing, and do it well". Avoids featuritis.
  • Faster than Emacs (historically at least).
  • Runs on all systems that can implement the standard C library, including UNIX, Linux, AmigaOS, DOS, Windows, Mac, BeOS, and POSIX-compliant systems.
  • Allows users of the QWERTY keyboard to keep their fingers on the home row, thus requiring less movement to edit.
  • Ubiquitous. Essentially all Unix and Unix-like systems come with vi (or a variant) built-in.

Benefits of Emacs

No comments:

Post a Comment