remove trailing whitespace in vim Jul 11, 2010 1 min read envimtipswhitespace 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