How to get Vim to highlight non-ascii characters?

前端 未结 8 1195
萌比男神i
萌比男神i 2020-11-29 15:14

I\'m trying to get Vim to highlight non-ASCII characters. Is there an available setting, regex search pattern, or plugin to do so?

8条回答
  •  天涯浪人
    2020-11-29 15:57

    This regex works as well. It was the first google hit for "vim remove non-ascii characters" from briceolion.com and with :set hlsearch will highlight:

    /[^[:alnum:][:punct:][:space:]]/
    

提交回复
热议问题