Thursday, December 30, 2010

Vim Shortcuts

  1. yank all lines to clipboard
    :%y+

  2. Copy multiple line
    V (Start highlight) + normal move keys to select + y 

  3. Replace word in file
     :r(use % to replace whole file)s/foo/bar/a 


  4. Replace word in file
     CTRL-V (CTRL-G is CTLV-V is used for paste on windows)+Select + I(UpperCase)+ comment+ESC 


0 comments: