Registers in vim are a great feature to store text snippets and even to run commands on the text stored within them. However, I'm a tidy person and tend to clean things up when I'm done.
I know that if I wanted to clear register a
, I can use qaq.
I can also execute the following command:
:let @a = ''
However, these solutions seem like a mere workaround to the problem. When I execute :registers
, the list still displays register a
(with an empty value), while registers that have otherwise never been used are not displayed.
Is there a way to clear a register with the side-effect of removing the register from this list?
And if so, is there also a way to clear all registers at once, i.e., to reset that list of registers?