Select when a shape needs inspection

0 of 2

The technique

Your textVim mode: Normal
Delete the repeated very . Before: Pack a very very small bag.. After: Pack a very small bag..

v starts the selection, e stretches it over the word and l adds the space. You see exactly what d will delete.

Keys in this lesson

v
Select characters. Move to grow the selection.
V
Select whole lines.

Before this lesson: Operators and movement.

More about this lesson

Use v and V positively, adjust a region and choose what to do with it.

v starts characterwise selection; V starts whole-line selection. Move to adjust the highlighted region, then d deletes, y copies or c changes it. Esc cancels selection. Adjust the selection before committing it. Native Vim also offers gv to reselect; this browser exercise does not rely on that command. A text object can be clearer for a known boundary, but visible selection is useful for irregular regions.

Example

From the start of a short phrase, v then e highlights one word. Extend with another e if two words belong to the edit. V then j selects two entire lines.

Use Reset to try again.

Guides on this topic

Exercise 1 of 2

0keys

par 4

Select and remove exactly the unwanted phrase shown in the target; preserve its surrounding punctuation and spacing.

Your textVim mode: Normal

Desired result

const message = "old note";
// Keep the archive unchanged.

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.