vim
#copy & paste
using text
:start line, end line copy dest ine
example :9,15 copy 16
it will copy line 9 to 15 to 16.
using v+y, p
1) v key, enter select mode, move current to select what your want , and then press "y" to copy the selected to memory
2) move the currsor to your desired position, press "p"
#paste
middle key of mouse or ctrl+shift+v
Cut and paste:
- Position the cursor where you want to begin cutting.
- Press
v
to select characters, or uppercaseV
to select whole lines, orCtrl-v
to select rectangular blocks (useCtrl-q
ifCtrl-v
is mapped to paste). - Move the cursor to the end of what you want to cut.
- Press
d
to cut (ory
to copy). - Move to where you would like to paste.
- Press
P
to paste before the cursor, orp
to paste after.
Copy and paste is performed with the same steps except for step 4 where you would press y
instead of d
:
d
stands for delete in Vim, which in other editors is usually called cuty
stands for yank in Vim, which in other editors is usually called copy