How do I store different pieces of text in separate registers for later pasting?
"ayy "byy "cyy
How it works Vim provides 26 named registers (a through z) that you can use as independent clipboards.
161 results for "paste"
"ayy "byy "cyy
How it works Vim provides 26 named registers (a through z) that you can use as independent clipboards.
<C-r><C-o>{reg}
When you use a in insert mode to paste register a, Vim inserts the text as if you typed it character by character.
:set clipboard=unnamedplus
Setting clipboard=unnamedplus makes Vim's default yank and paste use the system clipboard.
"ayv
Using named registers with visual mode lets you store multiple independent snippets simultaneously.
P
The P (uppercase) command pastes the contents of the default register before the cursor position.
"+p
The "+p command pastes the contents of the system clipboard into Vim.
"+y
The "+y command yanks (copies) text into the system clipboard register, making it available to paste in other applications outside of Vim.
:let @+ = expand('%:p')
Sometimes you need to share or use the full path of the file you're editing — for a terminal command, a config file, or a chat message.
<C-r><C-r>a
In insert mode, a pastes register a but processes the text as if typed, which can trigger abbreviations and mappings.
"+yy
The "+yy command yanks the current line directly to the system clipboard register, making it available for pasting in other applications.
"+y and "+p
The "+ register is linked to the system clipboard.
<C-w>n
n creates a new empty buffer and opens it in a horizontal split above the current window.
"{register}y{motion}
Vim has 26 named registers (a-z) that act as independent clipboards.
registers #registers #editing #normal-mode #yank #productivity
:@:
The : register stores the last command-line command.
viwp
The viwp command visually selects the word under the cursor and replaces it with the contents of the unnamed register (your last yank or delete).
visual-mode #editing #visual-mode #registers #paste #productivity
"qp
Macros are stored as plain text in named registers.
<C-r>0
In Insert mode, {reg} pastes the contents of any register inline at the cursor.
<C-r><C-r>{register}
In insert mode, {register} pastes the register's contents but runs it through Vim's insert-mode processing — including autoindent, textwidth wrapping, and for
:t {address}
How it works The :t command (short for :copy) copies one or more lines and places them below the specified address.
:let @a='<C-r>a'
Paste the macro register contents with :let @a=' followed by a to insert the current contents, edit them, and close the quote.