From c918836b91269054b674670e95dced99c0606de3 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 15 Oct 2013 06:50:26 +0200 Subject: vimrc: Do not highlight trailing space in insert mode ..while on the problematic line --- .config/vim/vimrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 5f972ab..a57dd3e 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -131,7 +131,12 @@ autocmd FileType tex colorscheme delek set spellfile=$XDG_DATA_HOME/vim/spell.de.add,$XDG_DATA_HOME/vim/spell.en.add + highlight ExtraWhitespace ctermbg=red guibg=red -autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red +match ExtraWhitespace /\s\+$/ " Show trailing whitespace and spaces before a tab: -match ExtraWhitespace /\s\+$\| \+\ze\t/ +"match ExtraWhitespace /\s\+$\| \+\ze\t/ +autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ +autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@