sjbach / lusty

LustyExplorer / LustyJuggler for Vim
http://www.vim.org/scripts/script.php?script_id=1890
257 stars 30 forks source link

Call to clearmatches #25

Closed jnz closed 13 years ago

jnz commented 13 years ago

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 line to lusty-explorer.vim:

    VIM::evaluate 'clearmatches()'

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()