How do I jump to the start or end of the text I just yanked or changed?
'[ and ']
Vim automatically sets two marks whenever you yank, change, delete, or paste text: ` [ ` (backtick-bracket) marks the start of the affected region, and ] ` mark
'[ and ']
Vim automatically sets two marks whenever you yank, change, delete, or paste text: ` [ ` (backtick-bracket) marks the start of the affected region, and ] ` mark
"ayv
Using named registers with visual mode lets you store multiple independent snippets simultaneously.
"ayi(
Combining named registers with text object motions lets you precisely yank structured content — like function arguments, quoted strings, or bracketed expressi
"ayy"byy
Yank the line twice into different registers.
"ayiw
Use "a to specify register a, then yiw to yank the inner word.
"a:'a,'by
Set marks with ma and mb, then yank the range between them into register a using "a:'a,'by.
"ayip
Use "ayip to yank the inner paragraph into register a.
"ayis
Use "ayis to yank the inner sentence into register a.
<C-v>jjll"ay
Enter visual block mode with , select the block, then "ay to yank the block into register a.
gg"aVGy
Go to the first line with gg, then visually select from there to the last line with VG, and yank into register a.
"aVaBy
Position cursor in a function, use VaB to visually select the block including braces, then "ay to yank into register a.
qaq:g/pattern/normal "Ayy
Clear register a with qaq, then use :g/pattern/normal "Ayy to append all matching lines to register a.
"0p
Register 0 (the yank register) always contains the text from your most recent yank command — and unlike the unnamed register, it is never overwritten by delet
"{register}y{motion}
Vim has 26 named registers (a-z) that act as independent clipboards.
registers #registers #editing #normal-mode #yank #productivity
yy
The yy command yanks (copies) the entire current line, including the newline character.
"+y
The "+y command yanks (copies) text into the system clipboard register, making it available to paste in other applications outside of Vim.
yyp
The yyp command duplicates the current line by yanking it and immediately pasting it below.
"Ayy
The "Ayy command appends the current line to register a instead of overwriting it.
"ayy ... "ap
Named registers let you store multiple pieces of text independently.