Vim (text editor)

From Freepedia

Vim
Image:Vim.png
Graphical Vim under GTK2
Maintainer: Bram Moolenaar and others
Stable release: 6.4.001  (October 17, 2005) [+/-]
Preview release: 7.0aa ALPHA snapshot 0157  (October 12, 2005) [+/-]
OS: Amiga, Linux, Mac OS, Windows, OpenVMS, OS/2, Unix
Genre: Text editor
License: GPL-compatible charityware
Website: http://www.vim.org/

Vim, which stands for Vi IMproved, is an open-source, multi-platform text editor.

Vim was first released by Bram Moolenaar in 1991. Since then Vim has added myriad features; many are helpful in editing program source code. Vim remains popular with programmers and users of Unix-like operating systems.


Contents

Modal editing

As a descendant of vi, Vim is modal - an unusual feature which tends to confuse new users. All editors are modal in the general sense of having to distinguish insert and command inputs, but most others implement that modality through very different methods: command menus (mouse or keyboard driven), meta keys (simultanous use of multiple keys, usually involving control (CTRL) or ALT), and/or general mouse usage. Vim, following vi, is unique in that you switch the entire keyboard into and out of these modes. By default this is done with the escape (ESC) key. This allows you, but does not require you, to perform all editing functions with no use of the mouse or menus and minimal use of meta keys. For touch-typists and those averse to the mouse, this can be a great benefit in power and efficiency.

Vim has six basic modes and five variants of the basic modes:

Normal

In normal mode you can enter all the editor commands such as cursor movement text deletion, etc. Vim starts in this mode by default. This is something many new users expect text editors to never do.

Operator-pending

In this sub-mode of normal mode an operator command has been started and Vim is waiting for a "motion" to complete it.

Insert Normal

This mode is entered when control-o is pressed in insert mode. It behaves like normal mode but only lets you execute one command before Vim returns to insert mode.

Visual

This behaves much like normal mode, but the movement commands extend highlighted text. When a non-movement command is used it is performed on the highlighted area.

Insert Visual

This is entered from insert normal mode by pressing control-o then starting a visual selection. After the visual selection ends Vim returns to insert mode.

Select

This somewhat like MS-WIndows selection mode -- you can highlight text with the mouse and the cursor keys, but typing a character causes the highlighted area to be deleted and Vim enters insert mode with the character you typed inserted.

Insert Select

This mode is usually entered by dragging the mouse or using a shifted arrow key in insert mode. After the selection ends Vim returns to insert mode.

Insert

In this mode most keys on the keyboard insert text into the buffer. This behavior is what most new users expect text editors to always do.

Replace

This is a special insert mode where you can do the same things as you would do in insert mode, but each character you type overwrites an existing character in the buffer.

Command-line

In command-line mode you can enter one line which is interpreted as a command (":" key), search ("/" and "?" keys), or a filter command ("!" key).

Ex mode

This is like command-line mode, but you can enter multiple commands until you leave this mode.

Evim

Vim has a special GUI mode that tries to behave more like a "modeless" editor called evim.

Features and improvements over Vi

Some of the main features of Vim and improvements of Vim over vi:

History

Date: Version: Milestone:

1988 1.0 Based on Stevie for the Amiga, named Vi IMitation, never publicly released.
November 2, 1991 1.14 First public release for the Amiga on Fred Fish disk #591.
1992 1.22 Port to Unix. Vim now competes with Vi. This was when Vim became Vi IMproved.
August 12, 1994 3.0 Support for multiple windows.
May 29, 1996 4.0 Graphical User Interface.
February 19, 1998 5.0 Syntax highlighting, basic scripting (user defined functions, commands, etc.).
September 26, 2001 6.0 Folding, plugins, multi-language, etc.
In Development 7.0 Spell checking, code completion, and more.

(Note that development releases and minor version releases after 3.0 aren't included in this list, yet.)

References

See also

External links



Views
Personal tools
In other languages
Similar Links