Vim Cut, Copy, and Past
Table of Contents
Whole Line Operation
yyorShift + 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
vto enter visual mode. You will see-- Visual --in the lower left corner of the terminal (PressEscif 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
yfor yank (copy) ordfor delete (cut) - Move the cursor and press
pto past it to the next line orShift + pfor up line