*trailing-whitespace.txt* trailing-whitespace This plugin causes all trailing whitespace to be highlighted in red. *FixWhitespace* To fix the whitespace errors, just call :FixWhitespace. By default it operates on the entire file. Pass a range (or use V to select some lines) to restrict the portion of the file that gets fixed. Based on http://vim.wikia.com/wiki/Highlight_unwanted_spaces , and Thanks to http://github.com/graywh/dotfiles/blob/master/.vimrc#L452 for improving the fix command.