vimcheat sheetreferencebeginner

Vim Motions Cheat Sheet for Beginners

6 min read

This is your quick reference guide to essential Vim motions. Bookmark this page and return whenever you need to look up a command. Whether you're editing code, writing documentation, or navigating config files, these motions will make you faster and more efficient.

Essential Navigation

These are the fundamental motions you'll use constantly. Master these first before moving to advanced commands.

CommandActionPractice
hMove leftPractice
jMove downPractice
kMove upPractice
lMove rightPractice
wMove to start of next wordPractice
eMove to end of wordPractice
bMove to start of previous wordPractice
0Move to start of linePractice
^Move to first non-blank characterPractice
$Move to end of linePractice
ggJump to start of filePractice
GJump to end of filePractice
:42Jump to line 42Practice

Editing Commands

Once you can navigate efficiently, these editing commands will make you productive.

CommandActionPractice
iInsert before cursorPractice
aInsert after cursorPractice
oInsert new line belowPractice
OInsert new line abovePractice
xDelete character under cursorPractice
ddDelete entire linePractice
dwDelete wordPractice
d$Delete to end of linePractice
cChange (delete and enter insert)Practice
sSubstitute characterPractice
yYank (copy)Practice
pPut (paste) after cursorPractice
uUndo-
Ctrl+rRedo-

Search and Jump Commands

These commands let you jump to specific locations instantly, making navigation effortless.

CommandActionPractice
/patternSearch forward for patternPractice
?patternSearch backward for patternPractice
nJump to next matchPractice
NJump to previous matchPractice
f<char>Find next occurrence of char in linePractice
F<char>Find previous occurrence of charPractice
t<char>Move cursor before next charPractice
T<char>Move cursor before previous charPractice
*Search for word under cursorPractice
#Search backward for word under cursorPractice

Visual Mode Selection

Visual mode lets you select text before applying a command. It's powerful for bulk operations.

CommandActionPractice
vEnter character-wise visual modePractice
VEnter line-wise visual modePractice
Ctrl+vEnter block-wise visual modePractice
v + motion + dSelect and deletePractice
v + motion + ySelect and yank (copy)Practice

Pro Tips for Maximum Efficiency

💡 Combine Numbers with Motions

Add a number before any motion to repeat it. Examples:

  • 3w - Move forward 3 words
  • 5j - Move down 5 lines
  • 2dd - Delete 2 lines

⚡ The Dot Command

Press . to repeat your last change. This is one of Vim's most powerful features. Make a change once, then navigate and press . to repeat it elsewhere.

🎯 Most Used Shortcuts

These are the commands you'll use 80% of the time:

  • hjkl - Basic navigation
  • w, b - Word navigation
  • 0, $ - Line navigation
  • i, a - Enter insert mode
  • dd, yy, p - Delete, copy, paste lines

Practice These Motions

Reading this cheat sheet is great for reference, but building muscle memory requires practice. Try these exercises to internalize the commands:

Ready to Master These Motions?

Turn this cheat sheet into muscle memory with our interactive exercises.

Start Practicing Now