Vim · Copy, paste & undo

Yank (copy) line

Press Y twice in sequence to copy the current line into the register.

Y+Y
Mac
Y + Y
Windows
Y + Y
Linux
Y + Y

More copy, paste & undo shortcuts in Vim

See all 30 Vim shortcuts →