To yank one line, follow these steps.
Position the cursor anywhere on the line you want to yank.
Move the cursor to the line above where you want to put (copy) the yanked line.
A copy of the yanked line appears in a new line below the cursor.
To place the yanked line in a new line above the cursor, type P.
The yy command works well with a count: to yank 11 lines, for example, type 11yy. Eleven lines, counting down from the cursor, are yanked, and vi indicates this with a message at the bottom of the screen: 11 lines yanked.