VI commands
Move commands
k up line
j down line
beginning of next line
l right space
right space
h left space
left space
w word forward
W word forward, ignore punctuation
e end of word
E end of word, ignore punctuation
b word backward
B word backward, ignore punctuation
0 beginning of line
^ first non-whitespace character on line
$ end of line
nG goto line n
G goto last line
^F scroll forward full screen
^D scroll forward half screen
^B back screen
^U back half screen
) next sentence
( previous sentence
} next paragraph
{ previous paragraph
H top line on screen
M middle line on screen
L bottom line on screen
Delete Commands
x under cursor
X before cursor
D rest of line
dd entire line
dw delete word
Change Commands
s under cursor
S same as cc
C rest of line
cc entire line
cw change word
r replace single char
Insert Commands
a after cursor
A at end of line
i before cursor
I at beginning of line
o open line below
O open line above current
Miscellaneous
u undo last change
. repeat last change
/ find forward (down)
? find backwards
n find next (same as /)
N find next in opposite direction
yw yank word
yy yank line
y yank any amount given my a move command
p put last thing yanked or deleted AFTER cursor
R overwrite characters
Some handy combinations
xp transpose two characters
deep transpose two words
ddp transpose two lines
ex Commands
:se nu turn on line numbering
:se nonu turn off above
:r read in a file
:! execute a shell command