Editor war
From Wikipedia, the free encyclopedia
In hacker culture, the editor war is an ongoing debate in the computer programming community about which text editor is best for their general purposes. The two largest camps are those favoring vi and those favoring Emacs.
The community has a tradition of treating their favored piece of software with a reverence bordering on religious fanaticism, and few pieces of software are more universal than text editors. Many flame wars have been fought between groups insisting that their editor of choice is the paragon of editing perfection, and insulting the other's. Most participants in these arguments recognize that it is (largely) tongue-in-cheek (see Humor). There are related wars over operating systems and programming languages, even source code indent style which some might think as a 'trivial' thing.
Editor wars are usually fought between the devotees of vi and Emacs, the two most popular editors on Unix (and Unix-like) operating systems. A significant portion of Unix users and programmers use one or the other of these editors. Many are familiar with both, at least enough to get around, and so feel they are well-placed to make judgment calls as to which is "better". Adding to this is the fact that both editors have a relatively steep learning curve, which means users have invested a lot of time in getting to know the editor they use.
Contents |
[edit] Differences between vi and Emacs
The most important differences between vi and Emacs are:
- vi is a modal editor, whereas Emacs is not. In vi, the commands for modifying text and for moving around mostly use simple letter and number keystrokes, overlapping the keystrokes used for inserting text. As a result, the user must switch into a separate mode to insert text.
- vi is small and fast, and (traditionally at least) has limited customizability. Emacs is slower (especially at startup), but is endlessly customizable, with a large number of bells and whistles.
- vi is normally used inside of a text-mode console, whereas GNU Emacs is most commonly run as a GUI application.
The difference in feature set and startup time tends to influence the way that the editors are used: vi users tend to enter and exit the editor repeatedly, and use the Unix shell for complex tasks, whereas Emacs users usually remain within the editor and use Emacs itself for complex tasks (including an embedded shell mode when issuing shell commands is necessary).
[edit] Supposed benefits of vi-like editors
- vi is smaller and faster than Emacs and requires less overhead, as it is not subject to creeping featurism.
- vi is present in all Unix based operating systems as guaranteed by the POSIX standard.
- vi users argue that it conforms with Unix design and philosophy ("do one thing, and do it well"). Unix does not advocate building "Swiss Army knives", rather, the right tool for the right job.
- vi commands are entered largely without the use of modifier keys such as Ctrl or Alt. Some users find this reduces repetitive strain injury in the wrists.
- vi is intentionally "what you see is what you get (pretty much everywhere)". vi users generally do not customize their editor much, as opposed to advanced Emacs users who would not feel comfortable if their heavily customized profile were not available to them.
[edit] Supposed benefits of Emacs
- Emacs has a much larger set of available commands than vi.
- Emacs is scriptable in a variant of the Lisp programming language called Emacs Lisp.
- Emacs includes vi, in the form of viper-mode.
- Emacs does not require switching between "command" and "input" mode.
- GNU Emacs can perform computations with some calendars, such as Mayan or Discordian, which are not supported by the vi-like editors.
- Emacs has special editing modes for more than 40 programming and markup languages including Java, Perl, C, C++, Objective-C, Fortran, Lisp, Scheme and Pascal and scripting language modes for Bash and other common shells.
- Emacs supports typing and displaying in 21 non-English languages, including Chinese, Czech, Hindi, Hebrew, Russian, Vietnamese as well as Western European languages.
- Emacs can create PostScript output from plain text files and has special editing modes for document presentation formats like LaTeX, TeX, and Wikipedia.
- Emacs can be used as a shell itself,[1] and many tasks which would normally require the user to exit the editor interface can be performed from within the editor interface using plugins. This includes merge and diff functions, changelog maintenance, debugging operations, version control management, file and directory manipulation via dired, makefile creation and newsgroup checking (using gnus).
- Emacs is easily extensible and modifiable in the tradition of the Unix philosophy in that users can simply add a mode (or really, a program) to the existing implementation of emacs by taking advantage of the Emacs Lisp interpreter, whereas vi users have to create an entirely new version of vi, leading to a messy monolithic crufty program; in this view (held by Eric S. Raymond among others), Emacs is not so much a program but a portable framework in which modules are added together as needed.
- Emacs is not qwerty-centric. vi's "hjkl" movement keys become awkward under alternative keyboard layouts, such as Dvorak.
[edit] Humor
Frequently, at some point in the discussion, someone will point out that ed is the standard text editor.
The Church of Emacs, formed by Richard Stallman, is a joke, and while it refers to vi vi vi (which is 6-6-6 in Roman numerals) as the "editor of the beast", it does not oppose the use of vi; rather, it calls proprietary software an anathema. ("Using a free software version of vi is not a sin; it is a penance."[2]) It has its own newsgroup, alt.religion.emacs that has posts purporting to support this parody religion.
Here is a typical post:
Truly, our responsibility to spread the Gospel of the Gnu is weighty. Cleave to what is good. Remember the words the prophet Stallman brought down from the Mount MIT, graved in Lisp on tablets of crystalline lambda calculus. Only this true: Emacs is pure. All else is false. Do not be misled by false gods like Vi, the Editor of the Beast. Do not be seduced by Word, the Scarlet Woman of Babylon. Do not be driven to madness by Xcode, the Blind Priest of the Children of Asherath. When the wild winds of chaos blow, stay pure. When the universe collapses in shards around you, stay holy. When the gibbering hobgoblins of apostate Editors attack with shards of broken syntax, seek the crystalline stillness within you. Brethren, ensure that you (Meta-x-say-hallel-to-Emacs) daily for otherwise you will be lost. When the Beast comes, only Emacs can save you. This was brought to you as a public service by the Holy and Ineffable Church of The Mighty Emacs. SUPPORT THIS CRUSADE WITH YOUR DONATIONS. EMAIL THE STILL BEATING HEART OF A VILE VI USER TO emacs-highpriest@god-hates-vi-users
Stallman has jokingly declared himself to be St IGNU−cius, a saint in the Church of Emacs.[3]
vi supporters have created an opposing Cult of vi, argued by the more hardline Emacs users to be an attempt to "ape their betters".
Regarding vi's modal nature, some Emacs users joke that vi has two modes - "beep repeatedly" and "break everything". vi users enjoy joking that Emacs's key-sequences induce carpal tunnel syndrome, or mentioning one of many satirical expansions of the acronym EMACS, such as "Escape Meta Alt Control Shift" (a jab at Emacs's reliance on modifier keys).[4] Others have posited that this acronym in fact means "Eight Megabytes And Constantly Swapping", in reference to Emacs's high system resource requirements in a time when eight megabytes was a great amount of memory.
[edit] Current state of the editor war
In the past, many small editors modelled after or derived from Emacs flourished. This was due to the importance of conserving memory with the comparatively minuscule amount available at the time. These days, with a plenitude of memory, many vi-alikes, vim in particular, have grown in size and code complexity to the point where they rival Emacs in these areas. These vi variants of today, as with the old light Emacs variants, tend to have many of the perceived benefits and drawbacks of the opposing side.
[edit] References
- Raymond, Eric S (2003). The Art of UNIX Programming. ISBN 0-13-142901-9.
[edit] External links
- alt.religion.emacs at Google Groups
- comp.editors at Google Groups
- Church of Emacs resources
- Rules, Sins, Virtues, Gods and more of The Church of Emacs
- Saint Ignucius — as portrayed by Richard Stallman
- The Cult of vi
- $EDITOR sucks-rules-o-meter measures which editor's activists are more visible on the Web
- Ed is the standard text editor