Vim (text Editor) Article Index for
Vim
Shopping
Vim
 

Information About

Vim (text Editor)





Software2 Information

  Name Vim
  Logo
  Screenshot
  Caption Graphical Vim under GTK2
  Developer Bram Moolenaar and others
  Operating System Amiga , Linux , Mac OS X , Windows , OpenVMS , OS/2 , Unix
  Genre Text Editor
  License GPL -compatible Charityware
  Website http://wwwvimorg/


Vim, which stands for '''Vi IMproved''', is an Open Source , Multiplatform Text Editor extended from '' Vi ''. It was first released by Bram Moolenaar in 1991 . Since then, numerous features have been added to Vim, many of which are helpful in editing program Source Code . Vim and vi are very popular editors for programmers and users of Unix-like operating systems.1
2
3


LEARNING TO USE VIM

]]
For many users, Vim may present a steep Learning Curve , meaning that learning is slow initially but once the user gets a grasp of the basics they progress quickly and their editing becomes more efficient.4 To facilitate this, there is the Vim Tutorial for beginners, usually invoked by typing "vimtutor" on the Unix Command Line or clicking on the Vim tutor Icon on the Windows desktop. There is also the Vim Users' Manual that details the basic and more advanced Vim features which can be read by typing " :help user-manual " within Vim.

New users should also learn how to navigate and understand the conventions of the Vim Help System by reading the main help file by typing " :help " without any arguments.


MODAL EDITING

As a descendant of ''s ( Mouse or Keyboard driven), Meta Key s (simultaneous use of multiple keys, usually involving Control Key (CTRL) or Alt Key (ALT)), and mouse input. Vim, following ''vi'', is unique in that the entire keyboard is switched into and out of these modes. This allows, but does not require, one 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:Vim help system (type " :help " within vim)


Normal

In normal mode one can enter all the editor commands such as cursor movement, text deletion, etc. Vim starts in this mode by default. This is contrary to what many new users expect.

Vim's power derives primarily from its extensive normal mode commands, many of them requiring an Operator to complete. For example, the normal mode command "dd" deletes the line the cursor is currently on, but "d" can be followed by a motion command instead of another "d" such as the line down key ("j") to delete the current and the next line. A count can also be provided; "2dd" (repeat 'dd' twice) does the same thing as "dj". Once the user learns various movement/jump commands and other normal mode editing commands and how they can be combined, their editing often becomes much more efficient than users of " Modeless " editors.

From normal mode one can enter Insert Mode in a number of ways; the most common are to press "a" (append) or "i" (insert).


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. Vim also supports special "text objects" in place of motions in operator-pending mode, which can include "aw" for a word, "as" for a sentence, "ap" for a paragraph, etc.

For example, "d2as" in normal mode deletes the current sentence and the next, and in Visual Mode , "apU" converts the current paragraph to uppercase.


Insert Normal

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


Visual

This behaves much like normal mode, but the movement commands extend highlighted text. The highlighting can be by characters, lines, or a block of text. When a non-movement command is used it is performed on the highlighted area. Vim's "text objects" can be used in this mode as motion commands as well.


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 is similar to modeless editors—one can highlight text with the mouse and the cursor keys, but typing a character causes Vim to replace the highlighted area with the typed character and enter insert mode.


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. Most new users expect text editors to maintain this behavior throughout the editing session.

From insert mode one can go back to Normal Mode by pressing the Escape Key (ESC).


Replace

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


Command-line

In command-line mode one can enter one line which is interpreted as a command (":" key), search ("/" and "?" keys), or a filter command ("!" key). Afterward Vim returns to the previous mode it was in, which is usually Normal mode.


Ex mode

This is like command-line mode, but one can enter multiple commands; one leaves 'ex mode' by typing "visual".


Evim

Evim is a special GUI mode that tries to behave more like a "modeless" editor where the editor starts and stays in Insert Mode and the user has to use the menus, mouse, and keyboard control keys, such as the arrow keys. This mode can be enabled by typing "evim" or "vim -y" on the command line. In Windows there is usually an Evim icon on the desktop.


CUSTOMIZATION

Part of Vim's power is that it can be extensively customized. For example the basic interface can be controlled by the many options available (" :help options "). Additionally the user can define personalized key mappings—often called Macros —or abbreviations to automate sequences of keystrokes, or even call internal or user defined functions (" :help map.txt ").


Vim script

There are many , Python , Ruby , Tcl , etc. interfaces that can be included in Vim at compile time.


FEATURES AND IMPROVEMENTS OVER ''VI''

Some of the main features of Vim and improvements of Vim over '' Vi '':




HISTORY


(Note that some dates are approximate,Dates were taken from the official Vim FTP site . development releases are not listed, and many minor version releases are not yet included in this list.)



SEE ALSO




REFERENCES





  • -->



EXTERNAL LINKS