Penguin

This page is kinda intended as a quick way of listing the various nifty commands in vi(1) and vim(1), see VimHowto for a "introduction" style

Movement Commands

h,j,k,l
left, down, up, right
fx
Move to next charactor x.
Fx
Move to previous charactor x
tx
Move to before next charactor x
Tx
Move to after previous charactor x
%
Goto matching charactor

Action(?) Commands

c
Change, delete text and go into insert mode
C
Change line
y
Yank (copy)
Y
Yank Line
d
Delete (cut)
D
Delete Line
p
Paste after
P
Paste before

Misc commands

v
Visually select by character
V
Visually select by line
mx
Save cursor position into register x
`x
Goto character position in register x
' x
Goto line in register x
"x
Use buffer x for next yank/delete/paste operation
qx...q
Begin recording commands (...) into register x
@x
Playback commands in register x
@@
Playback previous playback
.
Repeat command

Useful examples:

ct"
Change everything until the next "

:g!/foo/d

globally, for every line ! not containing the regex "foo", delete that line