zhuang@linux:~/reading/practical-vim/11-macros/$ less

Practical Vim / chapter 11

Macros

$ grep tags 11-macros.md

This post extracts some knowledge from Chapter 11 – Macros.

The q key functions both as the “record” button and the “stop” button. To begin recording our keystrokes, we type q{register}, giving the address of the register where we want to save the macros.

The @{register} command executes the contents of the specified register. We can also use @@, which repeats the macro that was invoked most recently.

The golden rule is this: when recording a macro, ensure that every command is repeatable.

zhuang@linux:~/reading/practical-vim/11-macros/$ comments