Handy Sed One Liners

Remove all whitespaces from the beginning of a line:
:%s/^\s\+

Delete all trailing whitespace (at the end of each line) with:

:%s/\s\+$//

Tidy up ugly HTML files to be spaced like a normal person:

vim fileIn.html -c "set sw=2 | %s/>/>\r/ | execute 'normal gg=G' | set nohlsearch | g/^\\s*\$/d"