The editor war is the rivalry between users of the Emacs and vi (now usually Vim, or more recently Neovim) text editors. The rivalry has become an enduring part of hacker culture and the free software community.

The Emacs versus vi debate was one of the original "holy wars" conducted on Usenet groups, with many flame wars fought between those insisting that their editor of choice is the paragon of editing perfection, and insulting the other, since at least 1985. Related battles have been fought over operating systems, programming languages, version control systems, and even source code indent style.

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

Benefits of Emacs 
 Emacs has a non-modal interface
 Non-modal nature of Emacs keybindings makes it practical to be supported as OS-wide keybindings.
 One of the most ported computer programs. It runs in text mode and under graphical user interfaces on a wide variety of operating systems, including most Unix-like systems (Linux, the various BSDs, Solaris, AIX, IRIX, macOS etc.), MS-DOS, Microsoft Windows, AmigaOS, and OpenVMS. Unix systems, both free and proprietary, frequently provide Emacs bundled with the operating system.
 Emacs server architecture allows multiple clients to attach to the same Emacs instance and share the buffer list, kill ring, undo history and other state.
 Pervasive online help system with keybindings, functions and commands documented on the fly.
 Extensible and customizable Lisp programming language variant (Emacs Lisp), with features that include:
 Ability to emulate vi and vim (using Evil, Viper or Vimpulse).
 A powerful and extensible file manager (dired), integrated debugger, and a large set of development and other tools.
 Having every command be an Emacs Lisp function enables commands to DWIM (Do What I Mean) by programmatically responding to past actions and document state. For example, a switch-or-split-window command could switch to another window if one exists, or create one if needed. This cuts down on the number of keystrokes and commands a user must remember.
 "An OS inside an OS". Emacs Lisp enables Emacs to be programmed far beyond editing features. Even a base install contains several dozen applications, including two web browsers, news readers, several mail agents, four IRC clients, a version of ELIZA, and a variety of games. All of these applications are available anywhere Emacs runs, with the same user interface and functionality. Starting with version 24, Emacs includes a package manager, making it easy to install additional applications including alternate web browsers, EMMS (Emacs Multimedia System), and more. Also available are numerous packages for programming, including some targeted at specific language/library combinations or coding styles.

Benefits of vi 
 Vi has a modal interface
 Edit commands are composable
 Vi loads faster than Emacs.
 Being deeply associated with UNIX tradition, it runs on all systems that can implement the standard C library, including UNIX, Linux, AmigaOS, DOS, Windows, Mac, BeOS, OpenVMS, IRIX, AIX, HP-UX, BSD and POSIX-compliant systems.
 Vim and neovim are extensible and customizable through Vim script or APIs for interpreted languages such as Python, Ruby, Perl, and Lua.
Ubiquitousness. Essentially all Unix and Unix-like systems come with vi (or a variant) built-in. Vi (and ex, but not vim) is specified in the POSIX standard.
 System rescue environments, embedded systems (notably those with BusyBox) and other constrained environments often include vi, but not emacs.

Evolution

Many small editors that were based on or derived from vi in the past were successful. This was because it was crucial to preserve the memory that was, at the time, relatively sparsely available. As computers have become more powerful, many vi clones, Vim in particular, have grown in size and code complexity. These vi variants of today, as with the old lightweight Emacs variants, tend to have many of the perceived benefits and drawbacks of the opposing side. For example, Vim without any extensions requires about ten times the disk space required by vi, and recent versions of Vim can have more extensions and run slower than Emacs. In The Art of Unix Programming, Eric S. Raymond called Vim's supposed light weight when compared with Emacs "a shared myth". Moreover, with the large amounts of RAM in modern computers, both Emacs and vi are lightweight compared to large integrated development environments such as Eclipse, which tend to draw derision from Emacs and vi users alike.

Tim O'Reilly said, in 1999, that O'Reilly Media's tutorial on vi sells twice as many copies as that on Emacs (but noted that Emacs came with a free manual). Many programmers use either Emacs and vi or their various offshoots, including Linus Torvalds who uses MicroEMACS. Also in 1999, vi creator Bill Joy said that vi was "written for a world that doesn't exist anymore" and stated that Emacs was written on much more capable machines with faster displays so they could have "funny commands with the screen shimmering and all that, and meanwhile, I'm sitting at home in sort of World War II surplus housing at Berkeley with a modem and a terminal that can just barely get the cursor off the bottom line".

In addition to Emacs and vi workalikes, pico and its free and open-source clone nano and other text editors such as ne often have their own third-party advocates in the editor wars, though not to the extent of Emacs and vi.

, both Emacs and vi can lay claim to being among the longest-lived application programs of all time, as well as being the two most commonly used text editors on Linux and Unix. Many operating systems, especially Linux and BSD derivatives, bundle multiple text editors with the operating system to cater to user demand. For example, a default installation of macOS contains ed, nano, TextEdit, and Vim. Frequently, at some point in the discussion, someone will point out that ed is the standard text editor.

Humor

The Church of Emacs, formed by Emacs and the GNU Project's creator Richard Stallman, is a parody religion. While it refers to vi as the "editor of the beast" (vi-vi-vi being 6-6-6 in Roman numerals), it does not oppose the use of vi; rather, it calls proprietary software anathema. ("Using a free version of vi is not a sin but a penance.") The Church of Emacs has its own newsgroup, alt.religion.emacs, that has posts purporting to support this belief system.

Stallman has referred to himself as St IGNU−cius, a saint in the Church of Emacs.

Supporters of vi have created an opposing Cult of vi, argued by the more hard-line Emacs users to be an attempt to "ape their betters".

Regarding vi's modal nature (a common point of frustration for new users) 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) or "Eight Megabytes And Constantly Swapping" (in a time when that was a great amount of memory) or "EMACS Makes Any Computer Slow" (a recursive acronym like those Stallman uses) or "Eventually Munches All Computer Storage", in reference to Emacs's high system resource requirements. GNU EMACS has been expanded to "Generally Not Used, Except by Middle-Aged Computer Scientists" referencing its most ardent fans, and its declining usage among younger programmers compared to more graphically oriented editors such as Atom, BBEdit, Sublime Text, TextMate, and Visual Studio Code.

As a poke at Emacs' creeping featurism, vi advocates have been known to describe Emacs as "a great operating system, lacking only a decent editor". Emacs advocates have been known to respond that the editor is actually very good, but the operating system could use improvement (referring to Emacs' famous lack of concurrency, which has now been added).

A game among UNIX users, either to test the depth of an Emacs user's understanding of the editor or to poke fun at the complexity of Emacs, involved predicting what would happen if a user held down a modifier key (such as  or ) and typed their own name. This game humor originated with users of the older TECO editor, which was the implementation basis, via macros, of the original Emacs.

Due to how one exits vi (":q", among others), hackers joke about a proposed method of creating a pseudorandom character sequence by having a user unfamiliar with vi seated in front of an open editor and asking them to exit the program.

The Google search engine also joined in on the joke by having searches for vi resulting in the question "Did you mean: emacs" prompted at the top of the page, and searches for emacs resulting in "Did you mean: vi".

See also

 Console wars
 Browser wars
 Comparison of text editors

Notes

References

External links
 Results of an experiment comparing Vi and Emacs
 Comparing keystrokes  per task
 Humor around Vi, Emacs and their comparisons
 Results of the Sucks-Rules-O-Meter for Vi and Emacs from comments made on the Web
 In the Church of Emacs "using a free version of vi is not a sin, it's a penance."
 Emacs offers Vi functionality, from the Emacs wiki
 Emacs Vs Vi, from WikiWikiWeb
 The Right Size for an Editor discussing vi and Emacs in relatively modern terms

Emacs
Free software culture and documents
Hacker culture
Internet culture
Software wars
 
Vi