Search code examples
vimautomationshortcutkey-bindings

Append keys to an earlier recording in vim


I know what recording in vim is.

Let's say I have already a recording on a register and I'm missing some more keys that I want to add to that sequence. Is there a way to append these keys to an earlier recording in vim?


Solution

  • Using an uppercase letter will append to a register, so qA would continue recording the @a macro.

    From :help q:

    q{0-9a-zA-Z"}       Record typed characters into register {0-9a-zA-Z"}
                        (uppercase to append).
    

    Note: this works for everything related to registers, so "Ayw would also append the next word to register "a.