Occasionally, you'll find yourself doing the same thing over and over to blocks of text in your document. vim will let you record an ad-hoc macro to perform the operation.
- qregister Start macro recording into the named register. For instance, qa starts recording and puts the macro into register a.
- q End recording.
- @register Replay the macro stored in the named register. For instance, @a replays the macro in register a.