Yanking and putting lines
In Vim, there are two keys to remember — y for yanking, and p for putting. We’re going to explore a number of ways to use the y and p keys in this lesson, but to kick us off, let’s try one of the simplest yank/put sequences possible: yanking a line with yy and then putting it into the buffer with p.
yy yanks the current line under the cursor. p will then put the yanked text onto the next line. You only need to yank the text once, then you can put it as many times as you like — and both yy and p accept counts.
Work through the checklist below.