In Vim, cutting and copying rely on two different commands:
din Vim means delete, in other editors, this might be named, cut.
yin Vim means yank, in other editors, this might be named, copy.
Therefore, in Vim to perform a Cut & Paste operation:
- Position your cursor where you wish to start your cut.
vto select characters, or uppercase
Vto select whole lines, or
Ctrl-vto select rectangle blocks(use
Ctrl-vis mapped to paste).
- Move your cursor to where you wish to end your selection.
dto cut or
- Move cursor to where you wish to paste your selection.
Pto paste before your cursor’s location, or
pto paste after your cursor’s lcoation.