Differences between revisions 38 and 52 (spanning 14 versions)
Revision 38 as of 2007-11-01 11:03:14
Size: 4101
Editor: DavidBoddie
Comment:
Revision 52 as of 2012-09-21 02:01:56
Size: 4805
Editor: Trolzen
Comment: wiki restore 2013-01-23
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Vi (and its popular variant ViImproved) is a small text editor which does a few things, mostly relating to editing text. If small editors with a single purpose and enough features to satisfy most text editing needs appeal to you, then you might want to consider using this editor.
Line 3: Line 2:
EmacsEditor is a large text editor which does quite a lot of things (including vi emulation), not all of which are related to editing text. If you find yourself interested in an application which does many things, but may require more learning to explore its potential, then you might find this editor to be of interest to you. = Emacs vs. Vi =
Line 5: Line 4:
Both of these editors support many fundamental virtues of text editors such as extensive syntax highlighting, collapsible functions, spell checking, macros, undo-redo, multiple document editing, and a large support community. They are both free, Open Source, mature software. Try them both and choose the one that best suits you.
Line 7: Line 5:
Among technically inclined UNIX/Linux users ''vi''/''vim'' tends to be preferred more by sysadmins
while ''emacs''/''xemacs'' tends to be favored by programmers. Comparing the typical usage patterns of these classes of users to the relative merits of the two editors this should not be surprising.
[[EmacsEditor|Emacs]] and [[Vim|Vim]] both are powered text editors with mostly same feature list for general editing commands but quite different in phylosophy and forkflow behind them.
Line 10: Line 7:
Commonly, systems administrators are working on many different machines, in varying states of installation, configuration and repair. They are making relatively quick edits to many different files. An editor with a quick load time, blazing keyboard efficiency (with the right expertise) and few library or other dependencies is essential. Preferably it will be the editor that virtually every version of UNIX includes by default. It is even, occasionally, handy that the editor be able to fall back on an old fashioned line editing mode when even the terminal emulation subsystem is non-functional.
Line 12: Line 8:
Programmers, on the other hand, tend to work extensively on large complex sets of related files. However they tend to have all of them located on one single machine (usually checked out of a version control system ''en masse''). For programmers the overhead of starting a larger, slower,
more complex editor is amortized over their usage. They may have the same instance of the editor up for weeks or months at a time, closing and opening buffers as necessary. Having an editor support a full programming language internally is important to many programmers, as they need IDE (integrated development environment) features and tools like ''ediff'' and ''emerge'' (for comparing and merging different versions of a file, for example).
Previously Vi (and its popular variant [[Vim|Vim]]) is tend to be a small text editor which does a few things, mostly relating to editing text, but today it more closely to Emacs. It starts mutch faster than [[EmacsEditor|Emacs]] and its usual workflow assume that you often enter to and exit from [[Vim|Vim]]. Today [[Vim|Vim]] have tabbed interface for simultaneously editing of several files. Emacs assume long session into it by using buffer interface for multiplies files (some people report than they live in Emacs for the years, reloading it for upgrades).
Line 15: Line 10:
Of course this generalization can fail us. Many programmers started as, or spent stints as systems administrators and developed a preference for ''vi'' over ''emacs.'' A modern version of ''vim'' can support almost any of the features one would expect of ''emacs.''
Line 17: Line 11:
Conversely many people are uncomfortable with ''vi's'' notorious "modal" paradigm. They never become accustomed to "command" vs. "insert" or "replace" modes and often consider the very notion to be atavistic. [[EmacsEditor|Emacs]] is a large text editor which does quite a lot of things (including vi emulation), not all of which are related to editing text. If you find yourself interested in an application which does many things, but may require more learning to explore its potential, then you might find this editor to be of interest to you.


Both of these editors support many fundamental virtues of text editors such as extensive syntax highlighting, collapsible functions, spell checking, macros, undo-redo, multiple document editing, and a large support community. They are both free, Open Source, mature software. Try them both and choose the one that best suits you.


Among technically inclined UNIX/Linux users ''vi''/''vim'' tends to be preferred more by sysadmins while ''emacs''/''xemacs'' tends to be favored by programmers (quotation needed). Comparing the typical usage patterns of these classes of users to the relative merits of the two editors this should not be surprising.


Commonly, systems administrators are working on many different machines, in varying states of installation, configuration and repair. They are making relatively quick edits to many different files. An editor with a quick load time, blazing keyboard efficiency (with the right expertise) and few library or other dependencies is essential. Preferably it will be the editor that virtually every version of UNIX includes by default. It is even, occasionally, handy that the editor be able to fall back on an old fashioned line editing mode when even the terminal emulation subsystem is non-functional.


Programmers, on the other hand, tend to work extensively on large complex sets of related files. However they tend to have all of them located on one single machine (usually checked out of a version control system ''en masse''). For programmers the overhead of starting a larger, slower, more complex editor is amortized over their usage. They may have the same instance of the editor up for weeks or months at a time, closing and opening buffers as necessary. Having an editor support a full programming language internally is important to many programmers, as they need IDE (integrated development environment) features and tools like ''ediff'' and ''emerge'' (for comparing and merging different versions of a file, for example).


Of course this generalization can fail us. Many programmers started as, or spent stints as systems administrators and developed a preference for ''vi'' over ''emacs.'' A modern version of ''vim'' can support almost any of the features one would expect of ''emacs.'' (''including'' a full programming language [python] available for use in vim, but anyway it less integrated and natural for programming editing than Elisp).


Conversely many people are uncomfortable with ''vi's'' notorious "modal" paradigm. They never become accustomed to "command" vs. "insert" or "replace" modes and often consider the very notion to be atavistic.
Line 21: Line 34:
  * In emacs and xemacs one can access the vi keybindings using the command: '''M-x viper''' (That's [Alt]+[x]viper[Enter] or [Esc][x]viper[Enter] --- either should work, but the latter will work on terminals/keyboards that don't have an [Alt] key).
  * In ''vim'' use the ''ex''-mode command ''':syntax on''' to enable syntax highlighting (which is often configured to be off by default)
  * To learn the basics of ''vim'' very quickly run the command ''vimtutor'' (it's a set of macro files that run in ''vim'' and teach one how to use it)
  * To learn the rudiments of ''emacs'' use: '''C-h, t''' (from inside the editor of course). (That's [Ctrl]+[h] and then [t]).  This will start the tutorial system that's written in emacs' "elisp" version of the Lisp programming language.

* In emacs and xemacs one can access the vi keybindings using the command: '''M-x viper''' (That's [Alt]+[x]viper[Enter] or [Esc][x]viper[Enter] --- either should work, but the latter will work on terminals/keyboards that don't have an [Alt] key).
 * In ''vim'' use the ''ex''-mode command ''':syntax on''' to enable syntax highlighting (which is often configured to be off by default)
 * To learn the basics of ''vim'' very quickly run the command ''vimtutor'' (it's a set of macro files that run in ''vim'' and teach one how to use it)
 * To learn the rudiments of ''emacs'' use: '''C-h, t''' (from inside the editor of course). (That's [Ctrl]+[h] and then [t]). This will start the tutorial system that's written in emacs' "elisp" version of the Lisp programming language.
Line 28: Line 43:
Line 29: Line 45:
CategoryEditors
[[
CategoryEditors|CategoryEditors]]

Emacs vs. Vi

Emacs and Vim both are powered text editors with mostly same feature list for general editing commands but quite different in phylosophy and forkflow behind them.

Previously Vi (and its popular variant Vim) is tend to be a small text editor which does a few things, mostly relating to editing text, but today it more closely to Emacs. It starts mutch faster than Emacs and its usual workflow assume that you often enter to and exit from Vim. Today Vim have tabbed interface for simultaneously editing of several files. Emacs assume long session into it by using buffer interface for multiplies files (some people report than they live in Emacs for the years, reloading it for upgrades).

Emacs is a large text editor which does quite a lot of things (including vi emulation), not all of which are related to editing text. If you find yourself interested in an application which does many things, but may require more learning to explore its potential, then you might find this editor to be of interest to you.

Both of these editors support many fundamental virtues of text editors such as extensive syntax highlighting, collapsible functions, spell checking, macros, undo-redo, multiple document editing, and a large support community. They are both free, Open Source, mature software. Try them both and choose the one that best suits you.

Among technically inclined UNIX/Linux users vi/vim tends to be preferred more by sysadmins while emacs/xemacs tends to be favored by programmers (quotation needed). Comparing the typical usage patterns of these classes of users to the relative merits of the two editors this should not be surprising.

Commonly, systems administrators are working on many different machines, in varying states of installation, configuration and repair. They are making relatively quick edits to many different files. An editor with a quick load time, blazing keyboard efficiency (with the right expertise) and few library or other dependencies is essential. Preferably it will be the editor that virtually every version of UNIX includes by default. It is even, occasionally, handy that the editor be able to fall back on an old fashioned line editing mode when even the terminal emulation subsystem is non-functional.

Programmers, on the other hand, tend to work extensively on large complex sets of related files. However they tend to have all of them located on one single machine (usually checked out of a version control system en masse). For programmers the overhead of starting a larger, slower, more complex editor is amortized over their usage. They may have the same instance of the editor up for weeks or months at a time, closing and opening buffers as necessary. Having an editor support a full programming language internally is important to many programmers, as they need IDE (integrated development environment) features and tools like ediff and emerge (for comparing and merging different versions of a file, for example).

Of course this generalization can fail us. Many programmers started as, or spent stints as systems administrators and developed a preference for vi over emacs. A modern version of vim can support almost any of the features one would expect of emacs. (including a full programming language [python] available for use in vim, but anyway it less integrated and natural for programming editing than Elisp).

Conversely many people are uncomfortable with vi's notorious "modal" paradigm. They never become accustomed to "command" vs. "insert" or "replace" modes and often consider the very notion to be atavistic.

Some tips:

  • In emacs and xemacs one can access the vi keybindings using the command: M-x viper (That's [Alt]+[x]viper[Enter] or [Esc][x]viper[Enter] --- either should work, but the latter will work on terminals/keyboards that don't have an [Alt] key).

  • In vim use the ex-mode command :syntax on to enable syntax highlighting (which is often configured to be off by default)

  • To learn the basics of vim very quickly run the command vimtutor (it's a set of macro files that run in vim and teach one how to use it)

  • To learn the rudiments of emacs use: C-h, t (from inside the editor of course). (That's [Ctrl]+[h] and then [t]). This will start the tutorial system that's written in emacs' "elisp" version of the Lisp programming language.

Ultimately the choice of a text editor is a highly personal one, so flame wars on the topic of vi vs. emacs are little more than a pastime for those who have already made up their minds.


CategoryEditors

EmacsVsVi (last edited 2013-04-20 11:12:02 by Neurosearcher)

Unable to edit the page? See the FrontPage for instructions.