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)
