Editor war
Encyclopedia
Editor war is the common name for the rivalry between users of the vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

 and Emacs
Emacs
Emacs is a class of text editors, usually characterized by their extensibility. GNU Emacs has over 1,000 commands. It also allows the user to combine these commands into macros to automate work.Development began in the mid-1970s and continues actively...

 text editor
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....

s. The rivalry has become a lasting part of hacker culture
Hacker culture
A hacker is a member of the computer programmer subculture originated in the 1960s in the United States academia, in particular around the Massachusetts Institute of Technology 's Tech Model Railroad Club and MIT Artificial Intelligence Laboratory...

 and the free software community
Free software community
The free-software community is an informal term that refers to the users and developers of free software as well as supporters of the free-software movement. The movement is sometimes referred to as the open-source software community or a subset thereof...

.

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
Operating system advocacy
Operating system advocacy is the practice of attempting to increase the awareness and improve the perception of a computer operating system. The motivation behind this may be to increase the number of users of a system, to assert the superiority of one choice over another or out of brand loyalty,...

, programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

s, and even source code indent style
Indent style
In computer programming, an indent style is a convention governing the indentation of blocks of code to convey the program's structure. This article largely addresses the C programming language and its descendants, but can be applied to most other programming languages...

, choice of editor usually only affects oneself.

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
Permutation
In mathematics, the notion of permutation is used with several slightly different meanings, all related to the act of permuting objects or values. Informally, a permutation of a set of objects is an arrangement of those objects into a particular order...

 of typed keys
Keyboard (computing)
In computing, a keyboard is a typewriter-style keyboard, which uses an arrangement of buttons or keys, to act as mechanical levers or electronic switches...

. This creates a path in the decision tree
Decision tree
A decision tree is a decision support tool that uses a tree-like graph or model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility. It is one way to display an algorithm. Decision trees are commonly used in operations research, specifically...

 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
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

 (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.
Function/navigation interface vi uses distinct editing modes. Emacs uses metakey chords.

Benefits of vi-like editors

  • Historically, vi is faster than Emacs.
  • Runs on all systems that can implement the standard C
    C (programming language)
    C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

     library, including UNIX
    Unix
    Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

    , Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

    , AmigaOS
    AmigaOS
    AmigaOS is the default native operating system of the Amiga personal computer. It was developed first by Commodore International, and initially introduced in 1985 with the Amiga 1000...

    , DOS
    DOS
    DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

    , Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

    , Mac
    Macintosh
    The Macintosh , or Mac, is a series of several lines of personal computers designed, developed, and marketed by Apple Inc. The first Macintosh was introduced by Apple's then-chairman Steve Jobs on January 24, 1984; it was the first commercially successful personal computer to feature a mouse and a...

    , BeOS
    BeOS
    BeOS is an operating system for personal computers which began development by Be Inc. in 1991. It was first written to run on BeBox hardware. BeOS was optimized for digital media work and was written to take advantage of modern hardware facilities such as symmetric multiprocessing by utilizing...

    , and POSIX
    POSIX
    POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...

    -compliant systems.
  • Allows users of the QWERTY
    QWERTY
    QWERTY is the most common modern-day keyboard layout. The name comes from the first six letters appearing in the topleft letter row of the keyboard, read left to right: Q-W-E-R-T-Y. The QWERTY design is based on a layout created for the Sholes and Glidden typewriter and sold to Remington in the...

     keyboard to keep their fingers on the home row, thus requiring less movement and less time to edit.
  • Ubiquitous. Essentially all Unix and Unix-like systems come with vi (or a variant) built-in.

Benefits of Emacs

  • One of the most ported
    Porting
    In computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed...

     non-trivial computer programs. It runs on a wide variety of operating system
    Operating system
    An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

    s, including most Unix-like
    Unix-like
    A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

     systems (GNU/Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

    , the various BSDs
    Berkeley Software Distribution
    Berkeley Software Distribution is a Unix operating system derivative developed and distributed by the Computer Systems Research Group of the University of California, Berkeley, from 1977 to 1995...

    , Solaris, AIX
    AIX operating system
    AIX AIX AIX (Advanced Interactive eXecutive, pronounced "a i ex" is a series of proprietary Unix operating systems developed and sold by IBM for several of its computer platforms...

    , IRIX
    IRIX
    IRIX is a computer operating system developed by Silicon Graphics, Inc. to run natively on their 32- and 64-bit MIPS architecture workstations and servers. It was based on UNIX System V with BSD extensions. IRIX was the first operating system to include the XFS file system.The last major version...

    , AmigaOS
    AmigaOS
    AmigaOS is the default native operating system of the Amiga personal computer. It was developed first by Commodore International, and initially introduced in 1985 with the Amiga 1000...

    , Mac OS X
    Mac OS X
    Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

     etc.), MS-DOS
    MS-DOS
    MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

    , Microsoft Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

     and OpenVMS
    OpenVMS
    OpenVMS , previously known as VAX-11/VMS, VAX/VMS or VMS, is a computer server operating system that runs on VAX, Alpha and Itanium-based families of computers. Contrary to what its name suggests, OpenVMS is not open source software; however, the source listings are available for purchase...

    . Unix systems, both free and proprietary, frequently provide Emacs bundled with the operating system
    Operating system
    An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

    .
  • Extensible and customizable (Lisp programming language variant—Emacs Lisp
    Emacs Lisp
    Emacs Lisp is a dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors . It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C...

    ), with features that include:
    • Ability to emulate vi (known as "viper-mode").
    • A powerful and extensible file manager (dired
      Dired
      Dired is a visual directory editor, a computer program for editing file system directories. Dired runs on any Emacs platform. Its commands are generally more modal than most Emacs commands because Dired is a specialized major mode on its own...

      ), integrated debugger, and a large set of tools to work with.

Humour

Frequently, at some point in the discussion, someone will point out that ed
Ed (text editor)
ed is a line editor for the Unix operating system. It was one of the first end-user programs hosted on the system and has been standard in Unix-based systems ever since. ed was originally written in PDP-11/20 assembler by Ken Thompson in 1971...

 is the standard text editor.

The Church of Emacs, formed by Richard Stallman
Richard Stallman
Richard Matthew Stallman , often shortened to rms,"'Richard Stallman' is just my mundane name; you can call me 'rms'"|last= Stallman|first= Richard|date= N.D.|work=Richard Stallman's homepage...

, is a joke. While it refers to vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

 as the "editor of the beast" (vi-vi-vi being 6-6-6
666 (number)
666 is the natural number following 665 and preceding 667.- In mathematics :666 is the sum of the first 36 natural numbers 666 (six hundred and sixty-six) is the natural number following 665 and preceding 667.- In mathematics :666 is the sum of the first 36 natural numbers 666 (six hundred and...

 in Roman numerals), it does not oppose the use of vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

; rather, it calls proprietary software
Proprietary software
Proprietary software is computer software licensed under exclusive legal right of the copyright holder. The licensee is given the right to use the software under certain conditions, while restricted from other uses, such as modification, further distribution, or reverse engineering.Complementary...

 an anathema
Anathema
Anathema originally meant something lifted up as an offering to the gods; it later evolved to mean:...

. ("Using a free
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 version of vi is not a sin but a penance
Penance
Penance is repentance of sins as well as the proper name of the Roman Catholic, Orthodox Christian, and Anglican Sacrament of Penance and Reconciliation/Confession. It also plays a part in non-sacramental confession among Lutherans and other Protestants...

.") It has its own newsgroup
Newsgroup
A usenet newsgroup is a repository usually within the Usenet system, for messages posted from many users in different locations. The term may be confusing to some, because it is usually a discussion group. Newsgroups are technically distinct from, but functionally similar to, discussion forums on...

, alt.religion.emacs, that has posts purporting to support this parody religion.

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
Carpal tunnel syndrome
Carpal Tunnel Syndrome is an entrapment idiopathic median neuropathy, causing paresthesia, pain, and other symptoms in the distribution of the median nerve due to its compression at the wrist in the carpal tunnel. The pathophysiology is not completely understood but can be considered compression...

, 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).

Others have posited that this acronym in fact means "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), in reference to Emacs's high system resource requirements.

As a poke at Emacs' creeping featurism, vi advocates will 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.

Word War vi is a humorous Defender-like shoot 'em up
Shoot 'em up
Shoot 'em up is a subgenre of shooter video games. In a shoot 'em up, the player controls a lone character, often in a spacecraft or aircraft, shooting large numbers of enemies while dodging their attacks. The genre in turn encompasses various types or subgenres and critics differ on exactly what...

 based on the editor war.

Current state of the editor war

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-alikes, Vim
Vim (text editor)
Vim is a text editor written by Bram Moolenaar and first released publicly in 1991. Based on the vi editor common to Unix-like systems, Vim is designed for use both from a command line interface and as a standalone application in a graphical user interface...

 in particular, have grown in size and code complexity. 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. For example, Vim without any extensions requires about ten times the disk space as vi, and recent versions of Vim can have more extensions and run slower than past versions of Emacs. Moreover, with the large amounts of RAM in modern computers, both vi and Emacs are lightweight compared to large IDEs such as Eclipse
Eclipse (software)
Eclipse is a multi-language software development environment comprising an integrated development environment and an extensible plug-in system...

, which tend to draw derision from both vi and Emacs users alike.

Tim O'Reilly
Tim O'Reilly
Tim O'Reilly is the founder of O'Reilly Media and a supporter of the free software and open source movements.-Life and career:...

 said, in 1999, that O'Reilly Media
O'Reilly Media
O'Reilly Media is an American media company established by Tim O'Reilly that publishes books and Web sites and produces conferences on computer technology topics...

's tutorial on vi sells twice as many copies as that on Emacs (which could mean either that vi is more popular or harder to learn). Many advanced programmers use either Emacs and vi or their various offshoots, including Linus Torvalds
Linus Torvalds
Linus Benedict Torvalds is a Finnish software engineer and hacker, best known for having initiated the development of the open source Linux kernel. He later became the chief architect of the Linux kernel, and now acts as the project's coordinator...

 who uses MicroEMACS
MicroEMACS
MicroEMACS is a small, portable Emacs-like text editor originally written by Dave Conroy in 1985, and further developed and maintained by Daniel M. Lawrence...

.

In addition to vi and emacs workalikes, pico
Pico (text editor)
Pico is a text editor for Unix and Unix-based computer systems. It is integrated with the Pine e-mail client, which was designed by the Office of Computing and Communications at the University of Washington....

 and its free and open source
Free and open source software
Free and open-source software or free/libre/open-source software is software that is liberally licensed to grant users the right to use, study, change, and improve its design through the availability of its source code...

 clone nano
Nano (text editor)
nano is a text editor for Unix-like computing systems or operating environments using a command line interface. It emulates the Pico text editor, part of the Pine email client, and also provides additional functionality....

and other text editors often have their own third-party advocates in the editor wars, though not to the extent of vi and emacs.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK