← Back to docsRecipe

Vim motions primer

Stop reaching for arrows. Internalize these 12 motions and you will navigate code at the speed of thought.

Core movement

h / lleft / right by char
j / kdown / up by line
w / bforward / back by word
0 / $start / end of line
^first non-blank char
gg / Gtop / bottom of file

Screen jumps

Ctrl+d / Ctrl+uhalf-page down / up
Ctrl+f / Ctrl+bfull-page down / up
zzcenter cursor on screen
zt / zbcursor to top / bottom

Precision

f{char}jump to next {char} on line
t{char}jump before next {char}
%jump to matching bracket
{num}Ggo to line {num}

Pro tip: Combine any motion with a count. 5j drops 5 lines. 3w skips 3 words. Counts become muscle memory faster than you think.