From fd1e601eaf766ee4a7d1642f06900d71c7f1d484 Mon Sep 17 00:00:00 2001 From: Oscar Morante Date: Mon, 21 Apr 2014 20:27:30 +0300 Subject: [PATCH] add option to highlight tabs --- plugin/bad-whitespace.vim | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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\+\%#\@