Repeat and reverse a character search

0 of 4

The technique

Your textVim mode: Normal
Jump to the second bar on the line. Before: north | centre | south. After: north | centre | south.

f| reaches the first bar and ; the next one. A comma would go back to the first.

Keys in this lesson

;
Repeat the last f, t, F or T.
,
Repeat it the other way.
2f|
Jump to the second | on the line.

Before this lesson: Character boundaries.

More about this lesson

Jump to a later match on the line, or go back the other way, without starting a new search.

f and F land on a character, and t and T stop just before it. ; repeats the search in the same direction and a comma goes back the other way. A count such as 2f| goes straight to the second match. These commands only work on the current line, so use / when you need another line.

Example

In north | centre | south, f| reaches the first bar and ; reaches the second. A comma takes you back to the first.

Use Start over to try again.

Guides on this topic

Exercise 1 of 4

0keys

par 4

The auth service tidies the email itself now. Remove .trim().toLowerCase().

Your textVim mode: Normal

Make it look like this

import { signIn } from "./auth";

// Emails are stored in lower case, so the form tidies what people type.
export function onSubmit(form) {
  return signIn(form.elements.email.value).then(redirectHome);
}

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.