Vi/Vim Command Reference

Navigation Commands

Command Description
h, j, k, l Move cursor left, down, up, right
0 Move to beginning of line
$ Move to end of line
w Move forward by word
b Move backward by word
gg Move to first line of file
G Move to last line of file

Editing Commands

Command Description
i Insert mode (before cursor)
a Append mode (after cursor)
o Open new line below current line
O Open new line above current line
x Delete character under cursor
dd Delete entire current line
yy Yank (copy) entire current line
p Paste after cursor
u Undo last action
Ctrl + r Redo last undone action