The Ultimate Cheat Sheet

Command Reference.

Don't memorize everything at once. Use this reference to find exactly what you need, when you need it.

Cmd+K
:qQuit Vim
:q!Force quit without saving
:wSave the file
:wqSave and quit
iEnter Insert mode
EscReturn to Normal mode
:e filenameOpen a file
:lsList all open buffers
:bnSwitch to next buffer
:bpSwitch to previous buffer
gfOpen file under cursor
h j k lMove left, down, up, right
ggGo to first line
GGo to last line
0 / $Go to start/end of line
Ctrl+b / Ctrl+fScroll page up/down
xDelete character under cursor
ddDelete current line
yyCopy current line
pPaste after cursor
u / Ctrl+rUndo / Redo changes
cwChange word
dwDelete word
/ patternSearch forward for pattern
n / NGo to next/previous match
:%s/old/new/gReplace all occurrences
*Search for word under cursor
vEnter Visual mode (character-wise)
VEnter Visual mode (line-wise)
Ctrl+vEnter Visual block mode
:tabnewOpen new tab
:splitSplit window horizontally
:vsplitSplit window vertically