Last Updated: 2021-05-16
:reg to open up the registers list and see what text is available.
To copy a line to a specific register, say "c" write
"cyy. I.e. the
" signals that a register follows (
Do not copy to a numbered register. This is simply a stack containing deleted lines.
To append to (instead of replacing a register), use capital letters:
To paste from a named register,
If the register consists of vim commands, you can execute it with
@. E.g. if I
yank the following text into a register b
:help Gblame. Then
@b will open up
the help. In this way, macros are stored in registers.
Vim registers persist even after we close Vim. This means eventually, you may add some very convenient snippets or lines to a register, and use them in different text editing sessions. Or save up macros for reuse.