overtone/overtone — comment on commit 29e79188ff1b0e369ed506734f12ebeda62d5f28
File:  line 0
By rosejn:

I have this in my .vimrc, so trailing whitespace is shown in red and typing ".w" (no quotes) will remove it.

" Dealing with White space
""""""""""""""""""""""""""""""""""
let hiExtraWhiteSpace = "hi ExtraWhitespace ctermbg=red guibg=red4"
exec hiExtraWhiteSpace
au ColorScheme * exec hiExtraWhiteSpace
au InsertEnter * match ExtraWhitespace /\s\+\%#\@ .w :FixWhitespace