Cheatsheet Pages / Vim Cheatsheet

How to use Vim registers — named registers and the system clipboard

One yank overwrote another you still need — named registers keep several clips, and "+ reaches the system clipboard.

Almost every entry was run headless in Vim 9.1 and the resulting file checked; the few entries a tiny build cannot run (system clipboard, persistent undo, the sudo save) were verified against Vim's own documentation instead.

:registers      " list every register and what it holds
"ayy            " yank this line into register a (named registers survive later yy/dd)
"ap             " paste from register a
"+y             " yank to the SYSTEM clipboard — needs a Vim built with +clipboard:
                " check yours with `vim --version | grep clipboard` (+clipboard = yes)
Vim Cheatsheet one-page card — commands that actually work
The full one-page card — Vim Cheatsheet. Get the complete cheatsheet on GitHub