Vim Cut, Copy, and Past
Table of Contents
Whole Line Operation
yy
orShift + Y
: Yank (copy) the current linedd
: Delete (cut) the current linep
: Paste the yanked or deleted text after the current line on the cursorShift + p
: Paste the yanked or deleted text before the current line on the the cursor
Partial Operation
- Move the cursor to the start point of the sentence that you want yank or delete
- Press
v
to enter visual mode. You will see-- Visual --
in the lower left corner of the terminal (PressEsc
if you want cancel) - Move the cursor to the end point of the sentence that you want yank or delete (Selected part will be highlighted)
- Press
y
for yank (copy) ord
for delete (cut) - Move the cursor and press
p
to past it to the next line orShift + p
for up line