Jump to content

Editor war: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 8: Line 8:
{{POV|date=March 2008}} <!-- Grouped and placed both variants close 2 each other for better reception.-->
{{POV|date=March 2008}} <!-- Grouped and placed both variants close 2 each other for better reception.-->
The most important differences between vi and Emacs are:
The most important differences between vi and Emacs are:
* vi editing retains, or keeps, each [[permutation]] of typed [[keyboard (computing)|keys]]. This creates a [[path]] in the [[decision tree]] which unambiguously identifies any [[command]].
* vi editing retains each [[permutation]] of typed [[keyboard (computing)|keys]]. This creates a [[path]] in the [[decision tree]] which unambiguously identifies any [[command]].
<!--There has to be mentioned that certain keys represent text-objects, other repetition, and other movement ... Permutation of such keys can be very effective, while keeping user thinking about what is he doing.-->
<!--There has to be mentioned that certain keys represent text-objects, other repetition, and other movement ... Permutation of such keys can be very effective, while keeping user thinking about what is he doing.-->
* Emacs does the same thing. Its commands are a [[combination]] of typed keys executed immediately, which leaves the user with the choice of whether or not to use a 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.


* vi is smaller and faster, and (traditionally at least) has limited customization capability.
* vi is smaller and faster, and (traditionally at least) has limited customization capability.

Revision as of 13:44, 26 June 2008

Editor war is the common name for the rivalry between users of the vi and Emacs text editors. The rivalry has become a lasting part of hacker culture and the free software community.

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 others. Most participants in these arguments recognize that it is (largely) tongue-in-cheek. There are related wars over operating systems and programming languages, and even source code indent style.

Editor wars are usually fought between the devotees of vi (and by proxy vim) and those favoring Emacs, the two most popular editors on Unix-like systems. Many users are familiar with both, at least enough to do basic text editing, and so feel they are well-placed to make judgment calls as to which is "better." Adding to this is the fact that because both editors are extensive and extremely powerful tools, they have a relatively difficult learning curve, which means users have invested a lot of time in getting to know the editor they use.

Differences between vi and Emacs

The most important differences between vi and Emacs are:

  • 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.
  • vi is smaller and faster, and (traditionally at least) has limited customization capability.
  • Emacs takes longer to start up and requires more memory. However, it is highly customizable and includes a large number of bells and whistles, as it is essentially a Lisp programming language execution environment which runs a Lisp program designed for text-editing.
  • vi was traditionally used inside of a text-mode console, having no graphical user interface (GUI) (although vim has one).
  • Whereas Emacs, while initially designed for use on a console, grew a GUI fairly early on. Modern versions of both provide various GUIs.

Historical remark:

  • 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. Both editors are now able to issue commands from the shell.

Benefits of vi-like editors

  • Follow a "Composition of simple tools" philosophy
  • Small in size and keeps with the Unix philosophy "do one thing, and do it well". Avoid Featuritis
  • Faster than Emacs
  • Run in all systems that can implement the standard C library, including DOS,Windows, Mac, BeOS, and POSIX compliant systems
  • Offer simplified movement on text (beginning|end of lines|word|paragraphs ...)
  • Can compose commands with movement, e.g. 6dd deletes 6 lines
  • Allow the user to keep fingers on home row thus requiring less movement to edit

Benefits of Emacs

Historical remark:

  • Early on, Emacs included a helpful screen explaining how to exit that was presented when the program started. At the time, vi did not provide such a hint, forcing many users who could not figure out how to exit to simply disconnect their terminals.

Humor

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

A 1984 interview with vi creator Bill Joy revealed that he himself used ed, which led Emacs proponents to the saying, "even Bill Joy doesn't use vi anymore."[1]

The Church of Emacs, formed by Richard Stallman, is a joke, and 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 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 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. The more modern humorist uses "Eventually Mallocs All Core Storage" as his or her future-proof witticism. Those who have a particular beef with the GNU flavor of EMACS (perhaps an XEmacs fan) may propose "Generally Not Used, Except by Middle-Aged Computer Scientists" as the proper expansion.

As a poke at Emacs’ creeping featurism, vi advocates will describe Emacs as “a great operating system, lacking only a decent editor”.

There is some additional humor that pokes fun at vi at http://www.dina.kvl.dk/~abraham/religion/vi-tutorial.html, as well as Lisp (associated with Emacs) at the xkcd comic here, here, and here.

Current state of the editor war

In the past, many small editors modeled 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. 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. Namely, 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 relatively lightweight compared to large IDEs such as Eclipse, which tend to draw derision from both vi and Emacs users alike.

O'Reilly, a company which sells Vim and Emacs tutorials say the Vim one sells twice as many as Emacs. In a paint balling event, about twice as many people signed up for Vim than Emacs.[5] This has been taken by some to suggest that around twice as many individuals prefer Vim over Emacs. However, it is noted that many advanced programmers use Emacs and its various offshoots, including Linus Torvalds who uses MicroEMACS.[6]

In a Q&A session with nine prominent programmers, when asked what their favorite tools were, six of them mentioned Emacs.[7]

In addition to vi and emacs workalikes, pico and its free software clone nano and other editors often have their own third-party advocates in the editor wars, though not to the extent of vi and emacs.

References

  • The Art of Unix Programming: Raymond, Eric S (2003). The Art of UNIX Programming. ISBN 0-13-142901-9.