The vim editor stores the text that you most recently changed, deleted, or yanked (covered below) in the General-Purpose buffer. The Undo command retrieves text from the General-Purpose buffer when it restores text.
The Yank command (y) is identical to the Delete (d) command except that it does not delete text from the Work buffer. The vim editor places a copy of the yanked text in the General-Purpose buffer. You can then use a Put command to place another copy of it elsewhere in the Work buffer. Use the Yank command just as you use the Delete command. The uppercase Y command yanks an entire line into the General-Purpose buffer.
Tip: Use yy to yank one line
Just as d RETURN deletes ...