vim copy&cut

原创:http://vim.wikia.com/wiki/Copy,_cut_and_paste

参考:http://linuxtoy.org/archives/efficient-editing-with-vim.html

Ever try to cut (or copy) some lines and paste to another place? If you need to count the lines first, then try these to eliminate counting task.

Cut and paste:

  1. Position the cursor where you want to begin cutting.
  2. Press v (or upper case V if you want to cut whole lines).
  3. Move the cursor to the end of what you want to cut.
  4. Press d.
  5. Move to where you would like to paste.
  6. Press p to paste after the cursor, or P to paste before.

Copy and paste can be performed with the same steps, only pressing y instead of d in step 4.

The name of the mark used is related to the operation (d:delete or y:yank).

I found that those mark names requires minimal movement of my finger.


你可能感兴趣的:(linux)