From c35e6ec061e9510522e9b29a27601a22da3efd3f Mon Sep 17 00:00:00 2001 From: lucerion Date: Thu, 21 May 2015 00:06:54 +0300 Subject: [PATCH] Change whitespace highlighting to BufRead event --- 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..03b7b00 100644 --- a/plugin/trailing-whitespace.vim +++ b/plugin/trailing-whitespace.vim @@ -15,7 +15,7 @@ endfunction " Highlight EOL whitespace, http://vim.wikia.com/wiki/Highlight_unwanted_spaces highlight ExtraWhitespace ctermbg=darkred guibg=#382424 autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red -autocmd BufWinEnter * if ShouldMatchWhitespace() | match ExtraWhitespace /\s\+$/ | endif +autocmd BufRead * if ShouldMatchWhitespace() | match ExtraWhitespace /\s\+$/ | endif " The above flashes annoyingly while typing, be calmer in insert mode autocmd InsertLeave * if ShouldMatchWhitespace() | match ExtraWhitespace /\s\+$/ | endif