diff --git a/plugin/bad-whitespace.vim b/plugin/bad-whitespace.vim index eece123..22fc4a3 100644 --- a/plugin/bad-whitespace.vim +++ b/plugin/bad-whitespace.vim @@ -2,15 +2,25 @@ " Maintainer: Bit Connor " Version: 0.3 +if !exists("g:bad_whitespace_show_tabs") + let g:bad_whitespace_show_tabs = 0 +endif + function! s:ShowBadWhitespace(force) if a:force let b:bad_whitespace_show = 1 endif highlight default BadWhitespace ctermbg=red guibg=red autocmd ColorScheme highlight default BadWhitespace ctermbg=red guibg=red - match BadWhitespace /\s\+$/ - autocmd InsertLeave match BadWhitespace /\s\+$/ - autocmd InsertEnter match BadWhitespace /\s\+\%#\@ match BadWhitespace /\s\+$\|\t\+/ + autocmd InsertEnter match BadWhitespace /\s\+\%#\@ match BadWhitespace /\s\+$/ + autocmd InsertEnter match BadWhitespace /\s\+\%#\@