2.9.2 Yank Commands

Yank commands yank a text of buffer into a (usually anonymous) register. Here the word “yank” is used in Vi’s sense. Thus yank commands do not alter the content of the buffer, and useful only in combination with commands that put back the yanked text into the buffer.

y motion-command

Yank the region determined by the motion command motion-command.

For example, y $ will yank the text between point and the end of line into an anonymous register, while "c y $ will yank the same text into register c.

Use the following command to yank consecutive lines of text.

y y
Y

Yank a line. Given n, yank n lines (vip-yank-line).

y r

Yank current region.

y R

Expand current region and yank it.