From 01d9f26995faa9d18fc3ec518cc14a6047fc576c Mon Sep 17 00:00:00 2001 From: Martin Lundberg Date: Sun, 12 Apr 2015 01:10:47 +0200 Subject: [PATCH] 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. --- plugin/trailing-whitespace.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/trailing-whitespace.vim b/plugin/trailing-whitespace.vim index 104c0b9..1d90b8a 100644 --- a/plugin/trailing-whitespace.vim +++ b/plugin/trailing-whitespace.vim @@ -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