Last active
July 3, 2018 09:48
-
-
Save niklas88/ebbb2b01a78e3c91999021803da5ffb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Show tabs, End-of-Line and Trailing spaces | |
set listchars=tab:▸\ ,eol:¬,trail:~ | |
" So the background is transparent for the above characters | |
highlight Normal ctermbg=none | |
highlight NonText ctermbg=none | |
" Whitespace at end of line in red | |
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() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment