Find a character boundary

0 of 4

The technique

Your textVim mode: Normal
Move to just before the first comma. Before: red, blue, green. After: red, blue, green.

t stops just before the character; f, would land on the comma itself.

Keys in this lesson

f,
Jump to the next comma on the line (any character works).
t,
Jump to just before it.
F,
Jump back to the previous comma.
T,
Jump back to just after it.
;
Repeat the last f, t, F or T.
,
Repeat it the other way.

Before this lesson: Compose an edit; word and quotation lessons.

More about this lesson

Predict whether a character search lands on or next to its destination.

f finds a character to the right on the current line; t stops just before it. F searches left; T stops just after the found character. ; repeats the original search and comma reverses its direction. They do not cross lines. A count chooses a later occurrence, such as 2f,.

Example

On “red, blue, green”, f, from r lands on the first comma; t, lands on d. From g, F, lands on the comma before green; T, lands on the following space. The target character survives a dt edit.

Use Reset to try again.

Guides on this topic

Exercise 1 of 4

0keys

par 2

Find the first vertical bar on this line. Finish on line 1, column 24, without changing the text.

Your textVim mode: Normal

Desired result

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
Reset the exercise
Ctrl+Alt+P
Previous exercise
Ctrl+Alt+N
Next exercise
Enter
After a solve: the next step

Ctrl+Alt shortcuts leave Vim's own keys alone. On a Mac, Control and Option.