- Vim stands for Vi improved
- text editor
- things cannot be written in root directory
- there are three modes
- insert mode — text editing
- command mode — primary mode for copying, pasting, searching
- last line mode — searching, saving, editing
vim— open Vim in terminalvi— open Vim in terminalvi [file]— create new file and open file with Vim- show line numbers
:set number - hide line numbers
:set nonumber - highlight syntax
:syntax on
i— initiate insert modeesc— change from insert mode to command mode:— change to last line mode
/[search_term]— find the specified search term
c[navigation]—cstands for change, e.g.ce— change until end of wordcb— chnage until start of wordciw— change whole word (change inner word)ci(— change everything inside brackets-pairci"— change everything inside quotescc— change whole lineC— change until end of linec0— change ntil start of linec^— change until first character of lined[navigation]— delete (see change
:helpor:h— open help manual:help [item]— search item in help manual:help 42— open chapter 42 in help manual
:x— write and exit Vim:wq— write and quit (save changes and exit Vim)ZZ— write and quit (save changes and exit)esc :q!— hard exit (discard)
vim --> vi --> ed [-i-d] --> ex
ed: 1. ... editor on unix line-oriented (lines can be edited)