Build one repeatable change

0 of 4

The technique

Your textVim mode: Normal
Add a semicolon to both lines. Before: apples / pears. After: apples; / pears;.

The dot repeats the whole change, including the jump to the end of the line that A makes.

Keys in this lesson

.
Repeat the last change.
A
Insert at the end of the line.

Before this lesson: Insertion doors; character search.

More about this lesson

Separate positioning from the change that dot will repeat.

Dot repeats the last complete change. A includes reaching the line end, so it adapts to different lengths. With i, insertion happens at the current position; move deliberately before repeating. O opens above even at the start of the buffer. Finish Insert mode before asking dot to repeat.

Example

Add a status suffix with A, type it, Esc. Move down with j and press dot. The new line may be a different length because A carries the line-end positioning.

Use Reset to try again.

Guides on this topic

Exercise 1 of 4

0keys

par 15

Append the review marker to the two current notes. Preserve the archive and any divider; notice which direction reaches the next edit.

Your textVim mode: Normal

Desired result

// Short note [reviewed]
// A longer review note [reviewed]
// 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.