How to use registers in Vim
Put a double quote and a letter in front of a yank or a paste. "ayy copies the line into register a, and "ap pastes it. Plain yanks and deletes leave the letter registers alone, so your copy stays there until you replace it.

Three new dishes go on the menu tomorrow. The mole burrito and the chorizo burrito need the hot note that's under the al pastor, and the squash tacos need the vegan note from the bean bowl. With plain yy and p you'd carry one note at a time, because each yank throws out the one before. Put each note in a register of its own, named by a letter, and you can carry both.
Al pastor burrito Hot: habanero salsaBean bowl Vegan: no cheese, no cremaMole burritoSquash tacosChorizo burritoAl pastor burrito Hot: habanero salsaBean bowl Vegan: no cheese, no cremaMole burrito Hot: habanero salsaSquash tacosChorizo burritoAl pastor burrito Hot: habanero salsaBean bowl Vegan: no cheese, no cremaMole burrito Hot: habanero salsaSquash tacos Vegan: no cheese, no cremaChorizo burritoAl pastor burrito Hot: habanero salsaBean bowl Vegan: no cheese, no cremaMole burrito Hot: habanero salsaSquash tacos Vegan: no cheese, no cremaChorizo burrito Hot: habanero salsaa and the vegan note into b. The last "ap comes after "byy and still pastes the hot noteNotes for the new dishes
The cursor is on the hot note.
This editor needs a keyboard. Read on, and play it at your computer.
Add to a register with a capital letter
A lowercase letter replaces what the register held. The same letter in capitals adds to it: "Ayy puts the line after whatever register a already holds. That lets you collect lines from all over a file and paste them in one go. Any letter from a to z will do, so pick one you'll remember, like h for hot.
The hot list
The board needs a list of the hot dishes. The cursor is on the first one.
This editor needs a keyboard. Read on, and play it at your computer.
To check what your registers hold before you paste, type :reg (short for :registers) and press ↵. It lists every register that holds something, with ^J marking the line breaks.
Get back what you yanked or deleted earlier
Vim fills some registers on its own. Register 0 holds your last yank, and only a yank changes it, so "0p pastes what you copied even after you've deleted something since. Paste without overwriting has the whole trick.
Each time you delete a line or more, it goes into register 1, and what was in 1 moves along to 2, 2 to 3 and so on up to 9. So "1p pastes the last line you deleted, and "2p the one before it. A smaller delete, such as a word with dw, goes to register - instead.
Two specials gone
Yesterday's two specials are the top two lines, and the cursor is on the first. In Normal mode you delete both with dd dd, then press "2p. Which line comes back?
"_dd deletes the line into _, the black hole, and fills no register at all. Register + is your computer's clipboard, which Copy to the system clipboard sets up.
Paste a register while you type
In Insert mode, Ctrl-r followed by a register's name types out what it holds, and you carry on typing. It saves you from spelling a long or awkward word twice. Copy the word into a register with "ayiw (which copies the word under the cursor), then Ctrl-ra wherever you need it.
Spell it once
Nobody at the shop can spell the new special. The cursor is at the start of its name.
today! and Escnotes.txtThis editor needs a keyboard. Read on, and play it at your computer.
| Keys | What it does |
|---|---|
| "ayy / "ayiw | Copy the line / the word into register a (any letter from a to z). |
| "ap / "aP | Paste register a after / before the cursor. |
| "Ayy | Add the line to the end of register a. |
| "add | Cut the line into register a. |
| "0p | Paste your last yank, whatever you've deleted since. |
| "1p to "9p | Paste a line you deleted, the newest in register 1. |
| "1p, then . | Paste the last deleted line, then each . pastes the one deleted before it. |
| "-p | Paste your last delete inside a line, such as a word. |
| "_dd | Delete without changing any register (the black hole). |
| "+y / "+p | Copy to / paste from the system clipboard. |
| Ctrl-ra | In Insert mode: type out what register a holds. |
:reg ↵ | List every register that holds something. |