Will Clarke

Vim Registers

2015-01-05

Vim Registers are where yanked / deleted text ends up.

Registers are usually accessed by the " key.

There are many different registers:

Register Description Example
Unnamed default / automatic dw
Numbered (0) last yanked text โ€œ0p
Numbered (1-9) historically deleted text โ€œ5p
Black Hole /dev/null of registers โ€œ_dw
Named a-z registers (like macros) โ€œay

Hope this makes sense! To set & get the contents of the register, you just need to do reference the name. Eg: "ayw => "ap


Tags

vim tips editor