Glossary

vim

vim ("Vi IMproved") is the most widely used descendant of the original vi editor written by Bill Joy in 1976. Its defining feature is modal editing: by default you are in normal mode, where keys move the cursor and manipulate text; i enters insert mode for typing; Esc returns to normal mode; : enters command mode for saving, quitting, and running commands.

Essentials:

i           insert before cursor
a           append after cursor
Esc         back to normal mode
:w          write (save)
:q          quit
:wq         write and quit
:q!         quit without saving
dd          delete (cut) a line
yy          yank (copy) a line
p           paste below
u           undo
Ctrl-R      redo
/pattern    search forward

Configuration lives in ~/.vimrc. Modern successors include Neovim, which forked vim in 2014 to modernise the codebase and add Lua scripting; on most systems vim and nvim are interchangeable for basic use.

Related terms: nano, Emacs, neovim, vi

Discussed in:

Also defined in: Textbook of Linux

Textbook of Linux — Learn Linux on iPhone — Download on the App Store