How do I view the contents of all registers in Vim?
:registers
The :registers command displays the contents of all Vim registers, showing you exactly what text is stored in each one.
198 results for "registers"
:registers
The :registers command displays the contents of all Vim registers, showing you exactly what text is stored in each one.
%. # :
Vim has read-only registers: % (current filename), # (alternate filename), .
:help registers
Vim has 10 types of registers, each serving a specific purpose.
"ayy"byy
Yank the line twice into different registers.
:let @a = ''
Registers persist their contents throughout your Vim session and even across sessions if viminfo or shada is enabled.
"ayv
Using named registers with visual mode lets you store multiple independent snippets simultaneously.
"1p then u then . to cycle
Vim stores your last 9 deletions in numbered registers "1 through "9.
"ayy ... "ap
Named registers let you store multiple pieces of text independently.
". / "% / ": / "# registers
Vim has four read-only special registers that automatically contain useful contextual information.
registers #registers #special-registers #workflow #productivity
"1p through "9p
Registers 1-9 contain the last 9 deletions or changes that are at least one line long.
:let @b = @a
The :let @b = @a command copies the contents of register a into register b.
:echo @%
Vim provides special read-only registers that hold the current and alternate filenames.
"1p then u.u.u.
Vim stores your last 9 deletions (of one line or more) in the numbered registers "1 through "9.
registers #registers #editing #normal-mode #undo-redo #paste
"-
Vim silently stores every deletion of less than one line in the special "- register (the "small delete" register).
"{register}y{motion}
Vim has 26 named registers (a-z) that act as independent clipboards.
registers #registers #editing #normal-mode #yank #productivity
"_dd
Use the black hole register " before a delete command.
"1pu.u.u.
Vim stores the last 9 deletions in numbered registers 1-9, with the most recent in register 1.
"ayy "byy "cyy
How it works Vim provides 26 named registers (a through z) that you can use as independent clipboards.
:call setreg('a', @a, 'v') then "ap
Use setreg() to change register a to characterwise mode (v), then paste.
"adiw then move, "aP and diw
Delete the first word into register a with "adiw, move to the second word, paste register a before with "aP, then delete the remaining original.