Sometimes you will make a mistake with a lengthy macro, but would rather edit it than re-record it entirely. You can do this using the following process:
Put the macro on an empty line with "<register>p
.
If your macro is saved in register a
, the command is "ap
.
Edit the macro as needed.
Yank the macro into the correct register by moving the cursor to the beginning of the line and using "<register>y$
.
You can re-use the original register or use another one. If you want to use register b
, the command is "by$
. or by using "<register>d$
(deletes the unused line)