Make replay robust
The technique
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.