Choose a word destination

0 of 3

The technique

Your textVim mode: Normal
Move to small, to its last letter, then back to its first. Before: pack small bags. After: pack small bags.

w lands on the s of small and e on its last l. b goes back to the s.

Keys in this lesson

w
Next word.
e
End of the word.
b
Back to the start of a word.

Before this lesson: First edits and modes.

More about this lesson

Learn where w, e and b stop, including when you start in the middle of a word.

w goes to the start of the next word, e goes to the end of a word, and b goes back to the start of a word. From inside a word, b goes to the start of that same word. Letters, digits and underscores make up a word, and punctuation counts as a word of its own.

Example

In “pack small bags”, w from p reaches s. e from s reaches the l at the end of small. From that l, b goes back to s. These keys only move the cursor.

Use Start over to try again.

Guides on this topic

Exercise 1 of 3

0keys

par 1

Put the cursor on saveCart in the useEffect line.

Your textVim mode: Normal

Move the cursor here

7    useEffect(() => saveCart(items), [items]);

Yours

Par

Keyboard shortcuts
Ctrl+Enter
Check the result
Ctrl+Alt+U
Undo the last change
Ctrl+Alt+H
Show the next hint
Ctrl+Alt+R
Start the exercise over
Ctrl+Alt+P
Previous exercise
Ctrl+Alt+N
Next exercise
Ctrl+Alt+K⌃⌥K
Show the keyboard shortcuts
Ctrl+Alt+F⌃⌥F
Turn focus mode on or off
Ctrl+Alt+S⌃⌥S
Open the editor settings
Enter
Go on to the next step after you finish

The Ctrl+Alt shortcuts don't clash with Vim's own keys. On a Mac, use Control and Option.