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
|
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
- "Kitchen sink" philosophy, larger set of features than vi.
- One of the most ported non-trivial computer programs. It runs on a wide variety of operating systems, including most Unix-like systems (GNU/Linux, the various BSDs, Solaris, AIX, IRIX, AmigaOS, Mac OS X[1][2] etc.), MS-DOS, Microsoft Windows[3][4][5] and OpenVMS. Unix systems, both free and proprietary, frequently provide Emacs bundled with the operating system.
- Extensible and customizable (Lisp programming language variant - Emacs Lisp), with features that include:
- Special editing modes for a large number of programming, markup, typesetting languages (Bash, C, Delphi, Java, Lisp, LaTeX, MediaWiki, Python ...).
- Ability to emulate vi (known as "viper-mode").
- A powerful and extensible file manager (dired), integrated debugger, and a large set of tools to work with.
Thanks to Wiki
No comments:
Post a Comment