Searchable reference of essential Vim commands, modes, and motions.
iInsert before cursor
aInsert after cursor (append)
oOpen new line below and insert
vVisual mode (character)
VVisual line mode
Ctrl-vVisual block mode
EscReturn to normal mode
h j k lLeft, down, up, right
w / bNext / previous word start
0 / $Start / end of line
gg / GFirst / last line
:42Go to line 42
{ / }Previous / next paragraph
Ctrl-d / Ctrl-uHalf page down / up
xDelete character
ddDelete (cut) line
yyYank (copy) line
p / PPaste after / before
dwDelete to next word
ciwChange inner word
u / Ctrl-rUndo / redo
.Repeat last change
/fooSearch forward for foo
?fooSearch backward for foo
n / NNext / previous match
:%s/a/b/gReplace all a with b
:%s/a/b/gcReplace all, with confirm
*Search word under cursor
:wSave
:qQuit
:wq / ZZSave and quit
:q!Quit without saving
:sp / :vspSplit horizontal / vertical
Ctrl-w wCycle windows
maSet mark a
`aJump to mark a
qa … qRecord macro into register a
@aPlay macro a
@@Replay last macro