I have added a match to my vimrc to display trailing whitespace characters in
red (see appendix). This has the side-effect that in the Lusty-Explorer buffer
some trailing whitespace/tab characters are also highlighted in red.
My current solution is to add the following call to lusty-explorer.vim/display.rb:
VIM::evaluate 'clearmatches()'
Update: forgot src/
Appendix:
highlight ExtraWhitespace ctermbg=red guibg=red
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s+$/
autocmd BufWinEnter * match ExtraWhitespace /\s+$/
autocmd InsertEnter * match ExtraWhitespace /\s+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s+$/
autocmd BufWinLeave * call clearmatches()
Merged, thanks! I made one small modification, as apparently clearmatches() only exists in Vim 7.2+, and I suppose it makes sense to maintain compatibility a little further back.
I have added a match to my vimrc to display trailing whitespace characters in red (see appendix). This has the side-effect that in the Lusty-Explorer buffer some trailing whitespace/tab characters are also highlighted in red. My current solution is to add the following call to lusty-explorer.vim/display.rb:
Update: forgot src/
Appendix: highlight ExtraWhitespace ctermbg=red guibg=red autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red match ExtraWhitespace /\s+$/ autocmd BufWinEnter * match ExtraWhitespace /\s+$/ autocmd InsertEnter * match ExtraWhitespace /\s+\%#\@<!$/ autocmd InsertLeave * match ExtraWhitespace /\s+$/ autocmd BufWinLeave * call clearmatches()