Advertisement
Guest User

Untitled

a guest
Jul 13th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Use visual mode, or directly:
  2.  
  3. :10,20yank
  4.  
  5. Copy to a new file:
  6.  
  7. :new | put | 0d
  8.  
  9. Usually, you'll either have a criterion, e.g. move all lines containing `pattern` to the end:
  10.  
  11. :g/pattern/m$
  12.  
  13. To copy (:copy or :t)
  14.  
  15. :g/pattern/t$
  16.  
  17. To yank to a register:
  18.  
  19. :let @a="" | g/pattern/y A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement