Wednesday, August 25, 2010

How to remove empty lines usgin gvim in windows/Linux

I am searching for this in the internet but with no luck :( And some what managed to make it work. So i just post it for the sake of people who search for deleting or removing blank or empty lines from a file. I tested this on gvim in windows machine and also vim in linux machine.

Steps:

  1. Go to command mode by pressing esc.
  2. Then type - ":%s/^[\ \t]*\n//g" with out quotes. :)

No comments:

Post a Comment