mirror of
https://github.com/bronson/vim-trailing-whitespace.git
synced 2025-11-08 11:33:54 -05:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user