Search for a destination

0 of 3

The technique

Your textVim mode: Normal
Jump to agenda on the next line. Before: Read next / The agenda is short.. After: Read next / The agenda is short..

What you type shows at the bottom of the editor. Enter jumps there and Esc would cancel the search.

Keys in this lesson

/text
Search forward. Press Enter to go.
?text
Search backward.

Before this lesson: Reach a line or buffer boundary.

More about this lesson

Search forward or backward, and see what happens when a search reaches the end of the file.

/ searches forward and ? searches backward. Type some text and press Enter. Esc cancels the search. A search looks past the current line, and when it reaches the end of the file it carries on from the other end. You don't have to type the whole word: a few letters are enough when they only match where you want to go. A search can also match text inside a longer word, so check where you land.

Example

From the top of a note, /agenda then Enter reaches the next agenda. From below it, ?agenda then Enter searches backward. What you type after / goes into the search, not the file, and Enter jumps to the match.

Use Start over to try again.

Guides on this topic

Exercise 1 of 3

0keys

par 5

Put the cursor on the throw that turns a failed response into an error.

Your textVim mode: Normal

Move the cursor here

13      if (response.status >= 400) throw new Error(`Request failed: ${response.status}`);

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.