Search notes:

VIM registers

Available registers

a - z / A - Z The named registers
0 - 9 The numberered registers
" The unnamed register
- The small delete register
% Contains the file name (read only)
: / . Other read only registers
# The alternate buffer
= The expression register
* / + / ~ The selection and drop registers
/ The last search pattern register
_ The black hole register

Types of registers

A register is one of these three types:
The type of the register can be set with the third argument of setreg().

Reading and writing a register programmatically

In a script or an ex command, the value of the register can be accessed by prepending it with the at symbol:
let l:value_of_register_f=@f
let @f='change value of register f'
The value of registers with a dynamic name can be set with setreg()

Assigning to an uppercase register

Assigning a value to a uppercase register actually appends the assigned value to the value of the respective lowercase register.

Clearing the content of a register

A register (here: r) can be cleared like so
:let @r=''
But some key strokes can be saved by recording nothing into a register: qrq

See also

:put r which inserts the content of register r after the current line.

Index