How do you yank an entire paragraph into a named register?
Use "ayip to yank the inner paragraph into register a.
category:
registers
tags:
#registers
#yank
#paragraph
How do you yank a sentence into a named register?
Use "ayis to yank the inner sentence into register a.
category:
registers
tags:
#registers
#yank
#sentence
How do you yank a visual block selection to a register?
Enter visual block mode with , select the block, then "ay to yank the block into register a.
category:
registers
tags:
#registers
#block
#yank
How do you yank the entire file contents into a register?
Go to the first line with gg, then visually select from there to the last line with VG, and yank into register a.
category:
registers
tags:
#registers
#yank
#entire-file
How do you yank an entire function body into a register?
Position cursor in a function, use VaB to visually select the block including braces, then "ay to yank into register a.
category:
registers
tags:
#registers
#yank
#function
How do you use text from one register inside a macro?
While recording macro a, paste from register b with "bp.
category:
registers
tags:
#registers
#macro
#paste
How do you use a register value in a substitute command?
In command-line mode, a inserts the contents of register a.
category:
registers
tags:
#registers
#substitute
#search
What is the unnamed register and how does it work?
The unnamed register "" is the default target for yank, delete, and change operations.
category:
registers
tags:
#registers
#unnamed
#default
How do you set the search register programmatically?
Use :let @/ = 'pattern' to set the search register directly.
category:
registers
tags:
#registers
#search
#set
What is the selection register in Vim and how do you use it?
The register represents the primary selection (middle-click paste in X11).
category:
registers
tags:
#registers
#selection
#primary
How do you set a register programmatically in Vim?
:call setreg('a', 'text')
Use setreg() to set register contents from Vimscript.
category:
registers
tags:
#registers
#setreg
#function
How do you paste over a visual selection without losing the register?
When pasting over a selection, the replaced text overwrites the unnamed register.
category:
registers
tags:
#registers
#paste
#selection
How do you paste a register using the :put command?
The :put a command pastes register a on a new line below the cursor.
category:
registers
tags:
#registers
#put
#command
What are the read-only registers in Vim?
Vim has read-only registers: % (current filename), # (alternate filename), .
category:
registers
tags:
#registers
#readonly
#special
How do you record a macro into a specific named register?
Press q followed by a lowercase letter (a-z) to start recording into that register.
category:
registers
tags:
#registers
#record
#macro
How do you paste from a register while in visual mode?
In visual mode, "ap replaces the selected text with the contents of register a.
category:
registers
tags:
#registers
#paste
#visual
How do you paste a register's contents multiple times?
Prefix the paste command with a count.
category:
registers
tags:
#registers
#paste
#multiple
How do you paste from a named register before the cursor?
Use "aP (uppercase P) to paste the contents of register a before the cursor position, as opposed to "ap which pastes after.
category:
registers
tags:
#registers
#paste
#before
How do you force a linewise register to paste characterwise?
:call setreg('a', @a, 'v') then "ap
Use setreg() to change register a to characterwise mode (v), then paste.
category:
registers
tags:
#registers
#characterwise
#paste
How do you paste a register value into the search prompt?
While in the search prompt (/), press a to insert the contents of register a.
category:
registers
tags:
#registers
#search
#paste