vim: Highlight non-ASCII characters

This commit is contained in:
2022-08-25 03:34:00 +02:00
parent 4415ff4653
commit 80b533d089

View File

@@ -50,3 +50,10 @@ augroup HighlightTrailingWhitespace
" first window created after startup (see :help WinNew) " first window created after startup (see :help WinNew)
au VimEnter,WinNew * call matchadd("TrailingWhitespace", '\s\+\%#\@<!$') au VimEnter,WinNew * call matchadd("TrailingWhitespace", '\s\+\%#\@<!$')
augroup END augroup END
" Highlight non-ASCII characters in the red used by my color scheme "OneDark"
highlight NonASCIIChars ctermfg=white guifg=white ctermbg=204 guibg=#e06c75
augroup HighlightNonASCIIChars
au!
au VimEnter,WinNew * call matchadd("NonASCIIChars", '[^\d0-\d127]')
augroup END