Vim's documentation describes it as an improved form of the oldervi text editor (though it is built from a distinctcodebase). In release information, the author originally implied that Vim was an abbreviation for "Vi IMitation", but later, the expansion was changed to "Vi IMproved" because, as described by the author, the functionality had increased beyond that of aclone of vi. Some sources indicate the change happened with v2.0, but conflicting information (including from author) suggests the change happened as early as v2.0[dubious –discuss] and as late as v3.0.[6]
Vim has been and continues to be popular forsoftware development. In 2018, it was voted the most popular editor amongstLinux Journal readers.[12] In 2015, theStack Overflow developer survey found it to be the third most popular text editor,[13] and, in 2019, the fifth most popular development environment.[14]
In 1988,Bram Moolenaar began work on what would become Vim. He used thecodebase for theStevie editor ported toAmiga (by Tony Andrews et al.) as a starting point.[15][16] Version 1.14 (completed 2 November 1991) became the first public release. It was distributed viaFish Disk #591 in January 1992.[15][17][18][19][20]
Vim is released under the Vimlicense, which includes somecharityware clauses that encourage users who enjoy the software to consider donating to children inUganda.[4] The Vim license is compatible with theGNU General Public License through a special clause allowing distribution of modified copies under theGNU GPL version 2.0 or later.[4]
Via itsGUI mode (called gVim), it presents an interface with more a modern experience including aspects such asmenus,toolbars andicons. The full functionality is still expressed through itscommand line mode.
Vim features various special memory entries called registers (not to be confused with hardware orprocessor registers). Whencutting, deleting, copying, or pasting text the user can choose to store the manipulated text in a register. There are 36 general-purpose registers associated with letters and numbers ([a-z0-9]) and a range of special ones that either contain special values (current filename, last command, etc.) or serve a special purpose.[25]
Like vi, Vim supports multiple editing modes. Depending on the mode, entered characters are either processed as command input or inserted as text. Vim has 14 modes (7 basic modes and 7 variants):[26]
Normal
For editor commands. Generally, this is the default mode andESC enters this mode.
Insert
For editing content like in a modern editor.[27][21]: 12
Visual
For selecting areas of text. Commands can be run on the selected area – moving, editing, filtering via built-in or external command, etc.
Visual linewise
Selects one or more whole lines.
Visual blockwise
Selects a rectangular block of text across one or more lines.
Select
Similar to visual, but commands are not interpreted. Instead, highlighted text is directly replaced by input from the keyboard. This behavior mimics the selection mode in editors on Windows platforms.
Command-line (Cmdline)
Provides a single line input at the bottom of the terminal. Commands (beginning with:) and some other keys for specific actions (including pattern search and the filter command) activate this mode. On completion of the command, Vim reverts to the previous mode.[27][21]: 12
Vim is customizable and extensible, making it attractive to those who want control and flexibility in a text editing environment.[28] Users can execute complex commands withkey bindings, which can be customized and extended. Therecording feature allows for the creation ofmacros to automate sequences of keystrokes and call internal or user-defined functions and mappings. Abbreviations, similar to macros and key mappings, facilitate the expansion of short strings of text into longer ones and can also be used to correct mistakes. Vim also features aneasy mode for users wanting a simpler user experience.[29]
There are manyplugins available that extend or add new functionality to Vim. These plugins are usually written in Vim's internal scripting language, vimscript (also known as VimL),[30] but can be written in other languages as well.
There are projects bundling together complex scripts and customizations and aimed at turning Vim into a tool for a specific task or adding a major flavour to its behaviour. Examples include Cream, which makes Vim behave like a click-and-type editor, or VimOutliner, which provides a comfortableoutliner for users of Unix-like systems.
Vim provides many features beyond what vi provides.[31] Some of Vim's enhancements includecompletion functions,comparison andmerging of files (known as vimdiff), a comprehensive integrated help system, extendedregular expressions,scripting languages (both native and through alternative scripting interpreters such as Perl, Python, Ruby, Tcl, etc.) including support forplugins, agraphical user interface (gvim), limitedintegrated development environment-like features,mouse interaction (both with and without the GUI),folding, editing of compressed or archived files ingzip,bzip2,zip, andtar format and files over network protocols such asSSH,FTP, andHTTP, session state preservation,spell checking, split (horizontal and vertical) and tabbed windows,Unicode and other multi-language support,syntax highlighting, trans-session command, search and cursor positionhistories, multiple level and branchingundo/redo history which can persist across editing sessions, and visual mode.[citation needed]
Vim continually saves information to a file[a] that allows for recovering from a crash. Generally, thefile extension is ".swp", but if the user tries to open a file when the recovery file already exists, then Vim notifies the user of the condition. If the user confirms to proceed, Vim uses a different extension to form a name for a file that does not exist. The extensions are along the progression: ".swo", ".swn", ".swm", etc.[32][33] The feature can be disabled.[34]
Vim provides a vi-compatibility mode that limits its functionality to be similar to that of vi. However, even in compatibility mode, Vim is not entirely compatible with vi as specified by POSIX.[35] For example, Vim does not support vi's open mode. Vim's developers state that it is "very much compatible with Vi".[36]
Vim script (also calledVimscript orVimL)[37] is thescripting language built into Vim.[38] Based on theex editor language of the original vi editor, early versions of Vim added commands for control flow and function definitions. Since version 7, Vim script also supports more advanced data types such aslists anddictionaries and a simple form ofobject-oriented programming. Built-in functions such asmap() andfilter() allow a basic form offunctional programming, and Vim script haslambda since version 8.0. Vim script is mostly written in animperative programming style.
Vimmacros can contain a sequence ofnormal-mode commands, but can also invoke ex commands or functions written in Vim script for more complex tasks. Almost all extensions (called plugins or more commonly scripts) of the core Vim functionality are written in Vim script, but plugins can also utilize other languages likePerl,[39]Python,[40]Lua,[41]Ruby,[42]Tcl,[43] orRacket.[44] These plugins can be installed manually, or through a plugin manager such as Vundle, Pathogen, or Vim-Plug.
Vim script files are stored as plain text, similarly to other code, and the filename extension is usually.vim. One notable exception to that is Vim's config file,.vimrc.
" This is the Hello World program in Vim script.echo"Hello, world!"" This is a simple while loop in Vim script.leti=1whilei<5 echo"count is"ileti+=1endwhileunleti
^Vim documentation: introArchived 13 January 2019 at theWayback Machine: "Vim is pronounced as one word, like Jim, not vi-ai-em. It's written with a capital, since it's a name, again like Jim."
The original interview:Moolenaar, Bram (18 April 2005)."Rozhovor: Bram Moolenaar" [Interview: Bram Moolenaar].LinuxEXPRES (Interview) (in Czech). Interviewed by Zapletal, Lukáš. question 2.Archived from the original on 28 December 2023. Retrieved3 January 2024.
^abcMoolenaar, Bram (13 December 2016)."Vim 25 presentation by Bram Moolenaar on 2016 November 2". Retrieved30 November 2025.Moolenaar: Fred Fish Disk 591 was published in '92, actually, January '92, so why November 2? Well, that's because if you look at the binary, when it was built (and it's like the birth certificate of Vim), and you can see that it's actually November 2. So that's where it comes from.
^abMoolenaar, Bram (10 October 2000)."The continuing story of Vim"(PDF).moolenaar.net.Archived(PDF) from the original on 18 April 2012. Retrieved19 September 2011.
^Oualline, Steve (April 2001).Vi IMproved (VIM)(PDF). New Riders Publishers.ISBN0-7357-1001-5.Archived(PDF) from the original on 19 November 2021. Retrieved11 October 2021.