Clearing Registers

Vim
Author

Imad Dabbura

Published

November 21, 2022

The easiest way to clear a register; in norma mode, is q-register_name-q. The command qa will start recording a macro in the register a, which cleans the register before it starts the key strokes that follow. So when it is followed right away by q, it acts as clearing the register a. This is very useful if we’re trying to copy something to a register, such as copy all TODO from all project files into a register so that we can then past them in new file.