Skip to the main content

Vim

Yank the current line

YY

Linux Desktop app Vim default commands

Practice this

In Vim, Y, then Y will yank the current line.

Where it works: Normal mode

Press the small letter, without Shift. Vim is case sensitive, and the capital letter is a different command.

Every documented variant

Variants of this shortcut
System Environment Keys
Linux Desktop app YY
Mac Desktop app YY

Where this comes from

Vim help: index.txt - vim/vim

Documentation checked on 2026-09-14. That is a documentation review, not a test run inside the application.

Report a correction