INSERT mode - write text as if in normal text editor
NORMAL mode - navigate, manipulate and execute commands
ESC - enter NORMAL modei - enter INSERT mode
Moving cursor
Word context:w # Start of the next worde # End of the wordb # Beginning of the word5w # Execute `b` 5 timesGo to line::<num> # Go to :num line:$ # End of a file
Insert
<num>i<phrase> + ESC # Insert :phrase :num times
Delete lines
:<params>d # Pattern :<start>,<end>d # Delete lines in range:%d # All lines:.d # Current line:$d # Last line:.,$d # From current to last line:g/<regex>/d # Delete lines matching regex
Options
NOTE: To persist configuration write certain options into .vimrc file in user's home directory.
:set <option> # Set option:set no<option> # Unset option:set number # Display line numbers:syntax on # Turn on syntax highlighting
Changing opened file
CTRL + SHIFT + I # Last opened file (back)CTRL + SHIFT + O # Last opened file (next):e. # Open directory listing