Mission 03 / 52• Basic Vim
Moving by Words
Stepping one character at a time with h and l works, but real text is made of words. Vim lets you hop between them in a single keystroke.
The word motions
- wjump to the start of the next word
- ejump to the end of the current or next word
- bjump back to the start of the previous word
When you run off the end of a line, these motions continue onto the next line automatically.
1const greeting = buildGreeting(name);2function buildGreeting(name) {3 return "Hello, " + name + "!";4}Try it above: press w repeatedly to skip across the line, then b to walk back. Use e when you want to land on the last character of a word — handy before appending.
Now it's your turn!
- Jump to each green target using word motions.
- Practice using w, e, and b to navigate quickly instead of stepping character by character.
- See how fast you can complete 15 targets.
0/15
1function setGreeting(greeting: string) {2 const element = document.getElementById('greeting');3 element.innerText = greeting;4}56setGreeting('Hello World!');NORMAL
00:00
NextCtrl+jInsert Mode