Make replay robust

0 of 1

The technique

Your textVim mode: Normal
Mark four items as reviewed and leave the footer alone. Before: one / two / three / four / footer. After: one [reviewed] / two [reviewed] / three [reviewed] / four [reviewed] / footer.

Recording handled the first item, so three replays finish the rest. A fourth would have changed the footer.

Keys in this lesson

qa
Record a macro into register a. Press q to stop.
3@a
Play macro a three times.

Before this lesson: Record, stop and replay.

More about this lesson

Bound replay and establish a reliable starting position on unequal lines.

A reliable macro establishes its boundary, makes the edit and prepares the next item. I and A handle unequal line lengths better than fixed horizontal movement. A count before @a runs that many replays; count only the remaining work. Preserve the protected footer and stop before it.

Example

If recording handled one of four items, 3@a handles the remaining three. An extra replay can edit the footer. Undo and refine the route when the next item has a different shape.

Use Reset to try again.

Guides on this topic

Exercise 1 of 1

0keys

par 21

Apply the shown suffix to the 3 current notes. Keep the archive untouched.

Your textVim mode: Normal

Desired result

// First [reviewed]
// A longer second note [reviewed]
// Third 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.