Last Updated: June 24, 2016
·
296
· ryrych

Editing macro in Vim

You've stopped recording Vim macro in q register, and then realized that you forgot to add something. There's no need to record it again. You have at least two ways to edit the macro.

If the missing part should land at the very end, press <kbd>Qq</kbd>, add the missing part and stop recording as usual, by pressing q.

If you need to fine-tune the whole macro, print it with <kbd>"qp</kbd>, edit and put it back to the q register with, for example: <kbd>"qyil</kbd>.