vi Cheat Sheet
There are two modes when using the vi editor: command and insert
When a file is first opened the editor starts in command mode.
To make changes to actual text enter insert mode.
Exit insert mode and switch back to command mode to save or exit.
i ==> switch to insert mode
Esc ==> exit insert mode - switch to command mode
:wq ==> Save changes and exit
:q! ==> Discard changes and exit
/ ==> Search - enter search characters and press Enter.
dd ==> delete entire line
G ==> Jump to last line of the file
nG ==> Jump to line n in the file
CTRL-F ==> Scroll forward one screen
CTRL-B ==> Scroll backward one screen