How do I paste from a register while staying in insert mode?
<C-r>{register}
Pressing followed by a register name in insert mode inserts the contents of that register at the cursor position without leaving insert mode.
33 results for "named register yank"
<C-r>{register}
Pressing followed by a register name in insert mode inserts the contents of that register at the cursor position without leaving insert mode.
"-
Vim silently stores every deletion of less than one line in the special "- register (the "small delete" register).
qA
If you finish recording a macro and realize you forgot a step, you don't need to re-record the whole thing.
macros #macros #registers #normal-mode #editing #productivity
"ap, edit, "ayy
Vim stores macros in registers, which means you can paste a macro's contents into a buffer, edit it as regular text, and yank it back into the register.
:let @+ = @"
Vim's :let @{reg} syntax lets you read from one register and write to another.
: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 = substitute(@a, 'old', 'new', 'g')
After recording a macro or yanking text into a named register, you may need to tweak it — fix a typo in a recorded macro, change a variable name in yanked tex
:let @a = "value"
The :let @{reg} = expr command lets you assign any string or expression directly into a named register without entering insert mode or performing a yank.
:call setreg('"', @", 'l')
Vim registers carry not just their text content but also a type: charwise (c), linewise (l), or blockwise (b).
:set clipboard=unnamedplus
Setting clipboard=unnamedplus makes Vim's default yank and paste use the system clipboard.
qQ...q
When you record a macro into register q with qq.
:put ={expression}
The :put command inserts the contents of a register as a new line below the cursor.
yyp
The yyp command duplicates the current line by yanking it and immediately pasting it below.