VI COMMAND SUMMARY
vi <filename> Starts vi
vi -R <filename> Starts vi editor in read-only mode
view <filename> Starts vi editor in read-only mode
<esc> Returns from text entry to command mode
EXIT
ZZ Write and quit
:wq Write and quit
:x Write and quit
:w Write
:w! Write (! overrides overwrite protection)
:q Quit
:q! Quit (! overrides prompt for not saving changed file)
INSERT/REPLACE
i Insert before cursor
a Append, insert after cursor
I Insert at beginning of line
A Insert at end of line
o Open new line below cursor
O Open new line above cursor
r Replace one character under cursor
R Replace beginning at cursor
DELETE
x Delete character at cursor
X Delete character before cursor
dd Delete current line
D Delete to end of line
MOVEMENT
j Down
k Up
h Left
l Right
Arrow keys work when available
/<pattern> Searches for next occurrence
?<pattern> Searches for last occurrence