Edit Recorded Macros
While recording a macro, it's very easy to do mistakes. When that happens, it's even easier to edit the already recorded macro than to re-record a new one:
Record a new macro in register
q
.Print the keystrokes of the macro in the current buffer by using
:put q
.Edit the macro in Vim.
Once the macro is updated to desired keystrokes, select and yank it to the
same register with
"qy
.Execute the updated macro from the register
q
with@q
.
Last updated
Was this helpful?