paint-brush
Vim - 4: A Guide on Copying, Removing, and Pastingby@artwalker
137 reads

Vim - 4: A Guide on Copying, Removing, and Pasting

by Ethan WangFebruary 2nd, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Copy & Paste - copy current line. Paste after cursor - paste after cursor. Remove & Paster - remove current line - remove contents of line. undo - undo the contents of the line that has been removed. Use the Yank Buffer to save the contents were deleted.
featured image - Vim - 4: A Guide on Copying, Removing, and Pasting
Ethan Wang HackerNoon profile picture

Copy & Paste

  • 'yy' - copy current line
  • 'p' - paste after cursor yy then p
  • 'u' - undo u
  • '3yy' then 'p' 3yy p

Remove & Paster

  • 'dd' - remove current line dd
  • 'p' - [N]dd uses the Yank Buffer to save the contents were deleted p
  • '3dd' then 'p' 3dd then p