Wednesday, September 16, 2009

Very helpful VI commands

Remove Blank Lines
  • :g/^%/d

Remove carriage returns ^M from lines

  • :%s/.$//g

Remove lines that start with #

  • :g/^\#/d

No comments:

Post a Comment