Remove unwanted spaces

If you have a document thats full of spaces or empty lines, edit it with Vim:

Eliminate empty lines:

:v/\S/d

Eliminate spaces at the beginning of each line:

:%s/^\s\+//

Eliminate spaces at the end of the each line:

:%s/\s\+$//

Posted

October 30, 2007, 12:01 pm

Tags

, , ,

More

Permalink

Comments

Send your comment by mail.