Sometimes we miss a vital step when we record a macro. There's no need to re-record the whole thing from scratch. Instead, we can tack extra commands onto the end of an existing macro.
We realize that we should have finished by pressing j
to advance to the next line.
Before we fix it, let's inspect the contents of register a:
Vim will record our keystrokes, saving them into register a by overwriting the existing contents of that register.
Vim will record our keystrokes, appending them to the existing contents of register a.
Discussion We can use this tech only to tack commands on at the end of a macro. If you want to add something at the beginning or somewhere in the middle of a macro, this technique would be no use to you!