Yank the count lines [into register x]; synonym for "yy"
Y
Example
Normal 0 / 1Normal 1 / 1one
two
three
four
fiveCursor on line 1, column 1one
two
three
four
fiveCursor on line 1, column 1Yank the count lines [into register x]; synonym for "yy".
Vim registers
"Unnamed register- Characterwise · Uses Yank register 0
saved 0Yank register 0- Characterwise
saved
Command applied
Vim registers
"Unnamed register Changed- Linewise · ↵ marks a line break · Uses Yank register 0
one↵ 0Yank register 0 Changed- Linewise · ↵ marks a line break
one↵
Before & after
one
two
three
four
fiveCursor on line 1, column 1Vim registers
"Unnamed register- Characterwise · Uses Yank register 0
saved 0Yank register 0- Characterwise
saved
one
two
three
four
fiveCursor on line 1, column 1Vim registers
"Unnamed register Changed- Linewise · ↵ marks a line break · Uses Yank register 0
one↵ 0Yank register 0 Changed- Linewise · ↵ marks a line break
one↵
Start in Normal mode. This is a text-buffer example; yanking copies lines without changing the buffer.
Details & Vim help
Example replayed in Vim
Yank the count lines [into register x]; synonym for "yy". Use in Normal mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.