Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 23rd, 2012  |  syntax: None  |  size: 0.28 KB  |  hits: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. highlight ExtraWhitespace ctermbg=red guibg=red
  2. match ExtraWhitespace /\s\+$/
  3. autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
  4. autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
  5. autocmd InsertLeave * match ExtraWhitespace /\s\+$/
  6. autocmd BufWinLeave * call clearmatches()