Vim Shortcuts Cheat Sheet

This is your Vim cheat sheet — bookmark it, print it, tape it to your monitor. These are the commands you’ll actually use every day. All shortcuts below work in NORMAL mode unless noted otherwise.

Shortcut Action
h j k l Left, down, up, right
w / b / e Next word / previous word / end of word
0 / $ Start / end of line
gg / G Start / end of file
Ctrl+d / Ctrl+u Half-page down / up
% Jump to matching bracket

Editing

Shortcut Action
i / a Insert before cursor / after cursor (enters INSERT )
o / O New line below / above (enters INSERT )
x / dd / dw Delete character / line / word
yy / yw Copy line / word
p / P Paste after / before cursor
u / Ctrl+r Undo / redo
. Repeat last change
ciw / ci" / ci( Change inside word / quotes / parens

Search & Replace

Shortcut Action
/pattern Search forward
?pattern Search backward
n / N Next / previous match
* / # Search word under cursor forward / backward
:%s/old/new/g Replace all in file
:s/old/new/g Replace all in current line

Files & Buffers

Shortcut Action
:e filename Open file
:w Save
:bn / :bp Next / previous buffer
:ls List open buffers
:bd Close buffer

Windows & Tabs

Shortcut Action
:sp / :vsp Horizontal / vertical split
Ctrl+w h/j/k/l Move between splits
:tabnew / :tabc New tab / close tab
gt / gT Next / previous tab

VISUAL Mode

Enter VISUAL mode to select text, then act on the selection:

Shortcut Action
v / V / Ctrl+v Character / line / block selection
d / y / c Delete / copy / change selection
> / < Indent / outdent selection
gq Reformat selection

Keep going