All levels
level 01 / 12
Basic Movement
Move by character, word, line, and file without touching the mouse.
You edit a line maybe once. You travel to it a hundred times. That’s why movement comes before everything else: most of Vim’s speed is just getting the cursor where you want it without thinking. The arrow keys work, but reaching for them drags your hand off home row every time. Starve that habit now, while the file is small.
Character & Word
h j k l → left, down, up, right
w / b → next / previous word (start)
e / ge → end of word / end of previous word
W B E → same, but WORD (whitespace-separated)
Line & File
0 ^ $ g_ → line start, first non-blank, line end, last non-blank
gg / G → start / end of file
42G :42 → go to line 42
% → jump to matching bracket
Blocks & Scrolling
{ } → previous / next paragraph
Ctrl+d/u → half page down / up
zz zt zb → cursor to center / top / bottom of screen
H M L → top / middle / bottom of visible screen
Word vs WORD
- From the start, press
wrepeatedly and watch how it treats punctuation as words. - Press
bto move back word by word. - Press
Wto jump by WORD: notice it skips punctuation differently. - Navigate to
"Alice"withw, theneto land on the closing". - Press
geto go back to the end of the previous word.
goal Understand the difference between w/b/e (word) and W/B/E (WORD).
Combined movement challenge
Starting from gg, reach each target with the fewest keystrokes:
- The word
useStateon line 2. - The
0insideuseState(0). - The closing
}of the component (use%orG). exporton the last line.- Back to
importon line 1.
goal Find the most efficient path: avoid hjkl for long distances.