Color trailing spaces

This commit is contained in:
Sonny 2018-07-02 14:24:56 +02:00
parent ce80b81516
commit 7be04bfc63

View file

@ -40,6 +40,13 @@ if exists('+termguicolors')
colorscheme breezy
endif
" Color trailing spaces with red color
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
" line numbers
set number