In any editor, Cut, Copy, and paste are basic operations to copy the lines of a code.

There are multiple ways to Cut, Copy, and Paste in the VIM editor.

One way,

cut: press dd on the cursor line copy: press yy on the current cursor line paste:press p to the cursor where you want to paste. This paste the copied or deleted line after the cursor.

use P to paste the line before the cursor