highlight: Mark space-tab mix as bad
[vimconf.git] / init.vim
index 3255e3322a503d45f5163506cfb447da63908e7b..e552eff7ff6769794875699c15e8e438a86ad925 100644 (file)
--- a/init.vim
+++ b/init.vim
@@ -40,17 +40,20 @@ end
 syntax on
 
 
-" Trailing whitespace
-highlight default link TrailingWhitespace SpellCap
-" Make trailing whitespace be flagged as bad.
-au BufRead,BufNewFile * syn match TrailingWhitespace /\s\+$/ containedin=ALL
-
-
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 " Some global plugin settings
 
 runtime plugsetup.vim
 
+" Attention: Must be run after plugsetup.vim
+" Trailing whitespace
+highlight default link BadWhitespace SpellCap
+" Make trailing whitespace be flagged as bad.
+au BufRead,BufNewFile * syn match BadWhitespace /\s\+$/ containedin=ALL
+" Make space before tab be flagged as bad and vice versa
+au BufRead,BufNewFile * syn match BadWhitespace / \+\t/ containedin=ALL
+au BufRead,BufNewFile * syn match BadWhitespace /\t \+/ containedin=ALL
+
 let g:airline_powerline_fonts=1
 let g:airline#extensions#tabline#enabled=1
 let g:airline#extensions#branch#enabled=1
@@ -119,6 +122,9 @@ au FileType mediawiki setlocal wrap linebreak tw=0
 au Filetype mail syn match Statement /^\s*-*\s*>8\s*-*\s*$/
 au Filetype mail syn match Statement /^\s*-*\s*8<\s*-*\s*$/
 
+" Line wrap crippled with numbers shown
+au Filetype man set nonumber
+
 
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 " Some plugin-specific settings