Vim (the Vi-IMproved Editor) is the Unix text-editor of choice. It was originally released to the public in 1991, making it more than twenty years old, and yet is still one of the most popular text editors among people who learn Linux, especially programmers and system administrators.

Vim is notable for a number of reasons:

  1. It is available on virtually every Linux system ever. (Run 'vim' at your terminal to use. If not, try 'vi'.)
  2. It is relatively light-weight: it's big competitor for the Greatest Text Editor Ever, emacs, has a vim plugin. It is often joked that emacs is a fine operating system, but sooner or later you'll need a vim-plugin to edit text on it.
  3. It is a modal editor: unlike most text editors, it has a number of different modes. The most important are Edit Mode (where you copy, paste, indent, delete and generally move around your text), and Insert Mode (where you actually type text.
  4. It is infamously cryptic.


Command Line Mode:

This is the mode in which vim commands can be entered to be intpreted by vim, it can usually by entered by hitting the escape key then the : key.



w - Save File
q - Quit Vim
wq - Save the File and quit vim.
q! - Do not save the file and quit vim
ab - make a abrevatition - SYNTAX: :ab mario Super Mario (make a abbrevation for mario, and have it be replaced with Super Mario)

Insert Mode

In this mode text data can be entered into a file like any other text editor, you can enter insert mode by pressing the i, insert, or s key. If abbrevations were made with the :ab command, then you can press space after the abbrevation has been eneterd to repace it with the full word.

Normal Mode

In this mode commands can be used to perform specfic text operations in vim, ex. delete 3 words from a line, It can be used during insert mode by pressing the esc key then using the command followed with the options you want to perform, commands can be combined to do diffrent kinds of things.

commands: (wip)

dw - delete a word

dd - delete a whole line

$- Move to the end of a line

v - seletect text word by word

V- select text line by line

y - "yank" into the current buffer (copying the text)

p - Paste before the cursor

P - paste after the cursor

Community content is available under CC-BY-SA unless otherwise noted.