remove trailing whitespace in vim
Here’s a quick tip to highlight trailing whitespace - put this on your .vimrc:
match Todo /\s\+$/
This will flag them the same way as TODO or FIXME, with a ugly yellowish mark:
To remove them, run this on normal mode:
:%s/\s\+$//e