Make it a lot easier to override highlighting

Adding default to the highlight line make sure that the highlighting won't be overwritten if it's already set in a user colorscheme.
This commit is contained in:
Martin Lundberg
2015-04-12 01:10:47 +02:00
parent d4ad27de05
commit 01d9f26995

View File

@@ -13,7 +13,7 @@ function! ShouldMatchWhitespace()
endfunction
" Highlight EOL whitespace, http://vim.wikia.com/wiki/Highlight_unwanted_spaces
highlight ExtraWhitespace ctermbg=darkred guibg=#382424
highlight default ExtraWhitespace ctermbg=darkred guibg=#382424
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
autocmd BufWinEnter * if ShouldMatchWhitespace() | match ExtraWhitespace /\s\+$/ | endif