VIM Editor ::: Cutting, Copying, Yanking, Deleting and Pasting in Vim

In Vim, cutting and copying rely on two different commands:

  • d in Vim means delete, in other editors, this might be named, cut.
  • y in Vim means yank, in other editors, this might be named, copy.

Therefore, in Vim to perform a Cut & Paste operation:

  1. Position your cursor where you wish to start your cut.
  2. Press v to select characters, or uppercase V to select whole lines, or Ctrl-v to select rectangle blocks(use Ctrl-q> if Ctrl-v is mapped to paste).
  3. Move your cursor to where you wish to end your selection.
  4. Press d to cut or y to copy.
  5. Move cursor to where you wish to paste your selection.
  6. Press P to paste before your cursor’s location, or p to paste after your cursor’s lcoation.

Source:

Copy, cut and paste