Editor war

From Wikipedia, the free encyclopedia
  (Redirected from Church of Emacs)
Jump to: navigation, search
For a type of conflict between Wikipedia editors, see Wikipedia:Edit war.

Editor war is the common name for the rivalry between users of the Vi (Vim) 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.

Differences between vi and Emacs[edit]

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 key combinations for which modifier keys are held down while other keys are pressed; a command gets executed once completely typed. This still forms a decision tree of commands, but not one of individual keystrokes.
Memory usage and customizability Historically, vi is a smaller and faster program, but with less capacity for customization. The vim version of vi has evolved to provide significantly more functionality and customization than vi, making it comparable to Emacs[notes 1]. vi start-up time is near instantaneous for small text files, while vim is almost as fast. Emacs takes longer to start up (even compared to vim) 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. Many versions of Emacs include a server mode designed to run continuously in the background. Various instances of emacsclient can then be started, attaching to this server and sharing state. Emacsclient startup time is practically instantaneous.
User environment vi was originally exclusively used inside of a text-mode console, offering no graphical user interface (GUI). Most modern vi derivatives, e.g. MacVim and gVim, include GUIs. However, support for proportionally spaced fonts remains absent. Also lacking is support for different sized fonts in the same document. Emacs, while also initially designed for use on a console, grew a TUI fairly early on due to its Lisp machine heritage. Current Emacs GUIs include full support for proportionate spacing and font-size variation. Emacs also supports embedded images and hypertext.
Function/navigation interface vi uses distinct editing modes. Emacs uses metakey chords.[notes 2]
Keyboard vi uses no <Alt> key and seldom uses the <Ctrl> key. So vi uses only most of the "usual" keys. Emacs uses <Alt> and <Ctrl> keys, and observes the <Shift> variety regularly. Emacs uses all the usual keys regularly, which tends to encourage ambidextrous usage of their symmetry.
Language and script support vi has rudimentary support for languages other than English. Vim is partially multilingual, with support for European, Arabic, Hebrew, and Far East Asian language support only. Notably, Indic language and script support is absent. Emacs has full support for all Unicode-compatible writing systems.

Benefits of vi-like editors[edit]

  • Edit commands are composable[4]
  • Vi has a modal interface
  • Historically, vi loads faster than Emacs. Currently, vim also loads faster than Emacs.[citation needed]
  • While 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.
  • Extensible and customizable through VimScript or APIs for interpreted languages such as Python, Ruby, Perl, and Lua
  • Ubiquitous. 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

Benefits of Emacs[edit]

  • Emacs has a non-modal interface
  • One of the most ported computer programs. It runs on a wide variety of operating systems, including most Unix-like systems (GNU/Linux, the various BSDs, Solaris, AIX, IRIX, OS X[5][6] etc.), MS-DOS, Microsoft Windows,[7][8][9] 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.
  • Extensible and customizable Lisp programming language variant (Emacs Lisp), with features that include:
    • Ability to emulate vi and vim (using Evil,[10] 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 applications, including a news reader, several mail agents, two IRC clients, and a variety of games. Starting with version 24, Emacs includes a package manager, making it easy to install additional applications including 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.

Humor[edit]

Richard Stallman appearing as St IGNU−cius, a saint in the Church of Emacs

Frequently, at some point in the discussion, someone will point out that ed is the standard text editor.[11]

The Church of Emacs,[12] formed by Richard Stallman, is a joke.[13] 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."[14]) The Church of Emacs has its own newsgroup, alt.religion.emacs,[15] that has posts purporting to support this parody religion.

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

Supporters of vi 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).[17] 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 IDEs and more graphically-oriented editors such as TextMate or SublimeText. The Emacs distribution includes the full list.[18]

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".

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 Control or Alt) and typed their own name. A similar "game" was reportedly played[19] among users of the old TECO editor, in which lay the roots of Emacs.

Due to the unintuitive character sequence to exit vi (":q!"), hackers joke that there is 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 Editor War today[edit]

In the past, many small editors modeled after or derived from vi flourished. This was due to the importance of conserving memory with the comparatively minuscule amount available at the time. 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 past versions of Emacs. In The Art of Unix Programming, Eric S. Raymond called Vim's supposed light weight when compared with Emacs "a shared myth."[20] Moreover, with the large amounts of RAM in modern computers, both vi and Emacs are lightweight compared to large integrated development environments such as Eclipse, which tend to draw derision from vi and Emacs 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).[21] Many programmers use either Emacs and vi or their various offshoots, including Linus Torvalds who uses MicroEMACS.[22] 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 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."[23][24]

In addition to vi and Emacs 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 vi and Emacs.

As of 2014, both vi and Emacs can lay claim to being among the longest-lived application programs of all time,[25] as well as being the two most commonly used text editors on Linux and Unix.[26][27] Many operating systems, especially GNU/Linux and BSD derivatives, bundle multiple text editors with the operating system to cater to user demand. For example, a default installation of OS X contains Emacs, Vim, nano and ed.

See also[edit]

Notes[edit]

  1. ^ As of 2013, vim has 1731 kLOC of code (1142 in C + 506 stock distro vimScript + 83 makefile-related), whereas GNU Emacs has 1623 (just 299 in C + 1270 stock distro Emacs Lisp + 54 makefile-related).[1][2] There are many optional Emacs Lisp (and Vimscript) packages available; the numbers here refer to only code which is actually included in the main download of the respective editor.
  2. ^ Emacs also has something called "modes"; however, in Emacs these generally refer to long-term interaction states that apply for entire time one works with a given file or dataset, and do not imply a modal interface per se.[3]

References[edit]

  1. ^ http://www.ohloh.net/p/emacs/analyses/latest/languages_summary
  2. ^ http://www.ohloh.net/p/vim/analyses/latest/languages_summary
  3. ^ http://www.emacswiki.org/emacs/CategoryModes
  4. ^ Kozlowski, Mike. "Why Atom Can’t Replace Vim". Retrieved 7 May 2014. 
  5. ^ "Carbon Emacs Package". Retrieved 2006-09-27. 
  6. ^ "Aquamacs is an easy-to-use, Mac-style Emacs for Mac OS X". Retrieved 2006-09-27. 
  7. ^ B, Ramprasad (2005-06-24). "GNU Emacs FAQ For Windows 95/98/ME/NT/XP and 2000". Retrieved 2006-09-27. 
  8. ^ Borgman, Lennart (2006). "EmacsW32 Home Page". Retrieved 2006-09-27. 
  9. ^ "GNU Emacs on Windows". Franz Inc. 2006. Retrieved 2006-09-27. 
  10. ^ "Evil - Home - Open wiki". gitorious.org. May 29, 2014. Archived from the original on September 16, 2014. Retrieved September 16, 2014. 
  11. ^ Ed, man! !man ed
  12. ^ Rules, Sins, Virtues, Gods and more of The Church of Emacs
  13. ^ Saint IGNUcius - Richard Stallman
  14. ^ All about Linux: The unabridged selective transcript of Richard M Stallman's talk at the ANU
  15. ^ alt.religion.emacs newsgroup
  16. ^ Saint IGNUcius - Richard Stallman
  17. ^ satirical expansions of EMACS
  18. ^ Eric S. Raymond (2004). The art of Unix programming. Addison-Wesley Professional. p. 343. ISBN 978-0-13-142901-7. Retrieved 17 December 2011. 
  19. ^ "Real Programmers Don't Use PASCAL". Datamation: 263–265. July 1983. 
  20. ^ "The Right Size for an Editor". 
  21. ^ Editor: vi or emacs?
  22. ^ Stifflog: Stiff asks, great programmers answer
  23. ^ Vance, Ashlee (September 11, 2003). "Bill Joy's greatest gift to man – the vi editor". theregister.co.uk. Archived from the original on June 3, 2014. Retrieved June 3, 2014. 
  24. ^ Joy, Bill (November 1999). The Joy of Unix: Sun Microsystems Co-Founder Bill Joy Charts Where Linux and Free Software Fit Into His Company's Solar System.. Linux Magazine. Interview with Eugene Eric Kim. Archived from the original on February 7, 2003. Retrieved June 3, 2014. 
  25. ^ "The Oldest Rivalry in Computing". "two rival programs can stake a claim to being among the longest-lived applications of all time. Both programs are about to enter their fifth decades. Both programs are text editors, for inputting and editing code, data files, raw HTML Web pages, and anything else. And they are mortal enemies." 
  26. ^ "Vim vs Emacs: Which Text Editor Do You Need?". "Vim and Emacs are the two most commonly used text editors on Linux" 
  27. ^ "Choosing an Editor". "these two editors express sharply contrasting design philosophies, but both are extremely popular and command great loyalty from identifiable core user populations. Surveys of Unix programmers consistently indicate about a 50/50 split between them, with all other editors barely registering." 

External links[edit]