Vim: Difference between revisions
imported>Joshua David Williams (creation) |
imported>Tom Morris No edit summary |
||
(19 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{subpages}} | |||
[[Image:vim screenshot.png|thumb|300px|The vim text editor running in a terminal emulator]] | [[Image:vim screenshot.png|thumb|300px|The vim text editor running in a terminal emulator]] | ||
''' | '''Vim''' is a [[modal]] plain [[text editor]]. Although it is most commonly used in [[Unix-like]] systems, it has also been ported to [[Microsoft Windows]]. Vim is an [[open source software|open source]] clone of [[vi]], and is an acronym for '''''Vi''' i'''m'''proved''. The main author and maintainer of Vim is Bram Moolenaar who currently works for [[Google]]. Originally Moolenaar developed Vim from an Atari ST and Amiga vi clone called Stevie. Vim is written in C and is coded very conservatively to ensure maximum compatibility across platforms and compilers. Vim does have programming interfaces available in [[Perl]], [[Python]], [[Tcl]], [[Ruby]] and a variety of other programming languages. Vim runs on most POSIX-compatible platforms (including Linux, FreeBSD etc.), on MS-DOS and Windows, Macintosh (OS X and Classic OS 9), VMS, BeOS, OS/2, RISC-OS, Amiga and OS/390. | ||
Like vi, vim contains two basic editing modes: command mode and insert mode. In command mode, nearly every keystroke is received as a command. For example, if a user types ":wq", vim will '''w'''rite the document and '''q'''uit. To move the cursor, one would use J to go down a line, K to go up a line, H to scroll one character to the left, and L to scroll one character to the right. Due to this unique approach, the user is rarely, if ever, required to remove his hands from the keyboard, thus making the interface very ergonomic. | Like vi, vim contains two basic editing modes: command mode and insert mode. In command mode, nearly every keystroke is received as a command. For example, if a user types ":wq", vim will '''w'''rite the document and '''q'''uit. To move the cursor, one would use J to go down a line, K to go up a line, H to scroll one character to the left, and L to scroll one character to the right. Due to this unique approach, the user is rarely, if ever, required to remove his hands from the keyboard, thus making the interface very ergonomic. | ||
In insert mode, nearly every key is interpreted as printed text. This is where the document itself is actually composed. This modal approach to editing is often confusing to new users who cannot understand why the text they type is not appearing on the screen. It is often useful for novice users to read a tutorial on using the application before they are required to use it. | In insert mode, nearly every key is interpreted as printed text. This is where the document itself is actually composed. This modal approach to editing is often confusing to new users who cannot understand why the text they type is not appearing on the screen. It is often useful for novice users to read a tutorial on using the application before they are required to use it. | ||
[[Image:gvim.png|thumb|300px|gvim displaying a [[C programming language|C]] source code file with syntax highlighting]] | |||
Although it has traditionally been used largely by console gurus, a graphical version has also been made. ''gvim'' was written with [[GTK+]] and provides much functionality that the text version could not or does not provide, such as in-line spell checking and syntax highlighting, in addition to easy-to-use menu shortcuts to many advanced editing functions, such as compiling source code. | |||
On [[Mac OS X]], MacVim provides a gvim-style experience but packaged as a Macintosh .app format, using OS X's Cocoa framework and a number of Macintosh services and APIs: for printing, spelling and the pasteboard - as well as menu and keyboard shortcuts that broadly match the interface expectations of a Macintosh application. | |||
==Related topics== | ==Related topics== | ||
Line 16: | Line 23: | ||
==External links== | ==External links== | ||
[http://www.vim.org/ Vim project page] | [http://www.vim.org/ Vim project page] | ||
Latest revision as of 10:13, 25 June 2009
![](http://s9.addthis.com/button1-share.gif)
Vim is a modal plain text editor. Although it is most commonly used in Unix-like systems, it has also been ported to Microsoft Windows. Vim is an open source clone of vi, and is an acronym for Vi improved. The main author and maintainer of Vim is Bram Moolenaar who currently works for Google. Originally Moolenaar developed Vim from an Atari ST and Amiga vi clone called Stevie. Vim is written in C and is coded very conservatively to ensure maximum compatibility across platforms and compilers. Vim does have programming interfaces available in Perl, Python, Tcl, Ruby and a variety of other programming languages. Vim runs on most POSIX-compatible platforms (including Linux, FreeBSD etc.), on MS-DOS and Windows, Macintosh (OS X and Classic OS 9), VMS, BeOS, OS/2, RISC-OS, Amiga and OS/390.
Like vi, vim contains two basic editing modes: command mode and insert mode. In command mode, nearly every keystroke is received as a command. For example, if a user types ":wq", vim will write the document and quit. To move the cursor, one would use J to go down a line, K to go up a line, H to scroll one character to the left, and L to scroll one character to the right. Due to this unique approach, the user is rarely, if ever, required to remove his hands from the keyboard, thus making the interface very ergonomic.
In insert mode, nearly every key is interpreted as printed text. This is where the document itself is actually composed. This modal approach to editing is often confusing to new users who cannot understand why the text they type is not appearing on the screen. It is often useful for novice users to read a tutorial on using the application before they are required to use it.
![](/wiki/images/thumb/7/73/Gvim.png/300px-Gvim.png)
Although it has traditionally been used largely by console gurus, a graphical version has also been made. gvim was written with GTK+ and provides much functionality that the text version could not or does not provide, such as in-line spell checking and syntax highlighting, in addition to easy-to-use menu shortcuts to many advanced editing functions, such as compiling source code.
On Mac OS X, MacVim provides a gvim-style experience but packaged as a Macintosh .app format, using OS X's Cocoa framework and a number of Macintosh services and APIs: for printing, spelling and the pasteboard - as well as menu and keyboard shortcuts that broadly match the interface expectations of a Macintosh application.