How do I quickly see what is stored in all of Vim's registers at once?
Answer
:registers or :reg
Explanation
:registers (or its short form :reg) displays the contents of all non-empty registers in a single view. Each register is shown with its name and current value, letting you inspect what is available for pasting, macro replay, or expression use.
How it works
:reg
Output (example):
Type Name Content
l "" hello world
l "0 hello world
l "1 deleted line
l "- x
l "a macro content
l "+ clipboard text
l "/ search pattern
l ": last ex command
l "% filename.py
Filtering registers
:reg a b c— show only registers a, b, and c:reg 0 1 2— show only numbered registers 0–2:reg +— show just the system clipboard
Register types shown
| Register | Contains |
|---|---|
"" |
Unnamed (last delete/yank) |
"0 |
Last yank |
"1–"9 |
Delete history (most recent first) |
"- |
Small delete (less than one line) |
"a–"z |
Named registers |
"+ / "* |
System clipboard / selection |
"/ |
Last search pattern |
": |
Last Ex command |
"% |
Current filename |
". |
Last inserted text |
Tips
- Use
:regbefore pasting to verify you are pasting the right content — avoid the "wrong register" surprise - Registers that contain macro keystrokes show the raw key sequence — useful for debugging macros
- In Insert mode,
<C-r>{reg}pastes a register; check with:regfirst to pick the right one - Empty registers are hidden from the output — if a register does not appear, it has no content