How do I copy the entire current line to the system clipboard?
"+yy
The "+yy command yanks the current line directly to the system clipboard register, making it available for pasting in other applications.
28 results for "yy"
"+yy
The "+yy command yanks the current line directly to the system clipboard register, making it available for pasting in other applications.
yy
The yy command yanks (copies) the entire current line, including the newline character.
p
The p command pastes (puts) the contents of the default register after the cursor.
yyp
The yyp command duplicates the current line by yanking it and immediately pasting it below.
"_d
The "d command deletes text using the black hole register ("), which discards the deleted content instead of storing it.
yss"
The yss{char} mapping from the vim-surround plugin surrounds the entire current line (ignoring leading whitespace) with the chosen delimiter.
<C-w>N
When using Vim's built-in :terminal, the buffer is in Terminal-Job mode by default, meaning all keystrokes go to the running shell.
gp
The standard p command pastes text after the cursor but leaves the cursor at the beginning of the pasted text.
:echo getregtype('a')
The getregtype() function returns the motion type of a register's content — whether it was yanked characterwise, linewise, or as a visual block.
"+y and "+p
The "+ register is linked to the system clipboard.
P
The P (uppercase) command pastes the contents of the default register before the cursor position.
gUU
The gUU command uppercases every character on the current line instantly — no visual selection or motion required.
"ayy ... "ap
Named registers let you store multiple pieces of text independently.
:put =toupper(@")
Registers in Vim are not only for raw replay; you can treat them as string data and transform them at paste time.
registers #registers #expression-register #editing #vimscript
:let @+ = @"
Vim's :let @{reg} syntax lets you read from one register and write to another.
guu / gUU
Vim's case operators gu (lowercase) and gU (uppercase) follow the same doubling convention as dd and yy: repeating the operator letter applies it to the whole c
:call setreg('"', @", 'l')
Vim registers carry not just their text content but also a type: charwise (c), linewise (l), or blockwise (b).
"-
Vim silently stores every deletion of less than one line in the special "- register (the "small delete" register).
stevearc/oil.nvim
oil.
:let @a = @"
Vim's :let command lets you read and write register contents as strings, making it possible to copy, combine, or modify register values without ever leaving the