Build one repeatable change
The technique
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.