3 ms·
Sure: fun! HighlightNonAscii() if &ft =~ 'markdown\|text' return endif syntax match nonascii "[^\x00-\x7F]" highlight nonas
by kuon 5y ago
Sure:
fun! HighlightNonAscii()
if &ft =~ 'markdown\|text'
return
endif
syntax match nonascii "[^\x00-\x7F]"
highlight nonascii guibg=#ff2232 guifg=#000000
endfun
autocmd BufEnter * call HighlightNonAscii()
Your version might depend on your frontend (gui, terminal...). And you might want to filter more file types.