I have a pretty general approach to this in
~/.vim/plugin/badwords.vim which I'll put here (word list subject to opinion). You could easily modify the list to capture the characters you care about. The file highlights all the words automatically (as long as the buffer has some
syntax) and provides a global
:Badsearch command to put all occurences in the quickfix list. It also supports defining
g:badwords to extend the list.
Another option is to loop through the range of unicode-codepoints (or build a representative character class) and handle them in a similar way.
let g:loaded_badwords = 1
" obvious obviously
" basic basically
" simple simply
" of course
" clear clearly
" everyone knows
" utilize utilized utilization utilizes
let s:badwords = [
\ '\<of course\>',
\ '\<everyone knows\>',
hi def link Badword ErrorMsg
function s:mark_bad(word) abort
let l:pattern = printf('/\c%s/', a:word)
exec 'syn match Badword' l:pattern 'containedin=ALL'
autocmd Syntax * for word in get(g:, 'badwords', ) + s:badwords | call s:mark_bad(word) | endfor
command -bang -nargs=? -complete=file Badsearch
\ execute 'vimgrep'
\ '/'.join(get(g:, 'badwords', ) + s:badwords, '\|').'/'.(<bang>0 ? 'g' : '')
\ (empty(<q-args>) ? expand('%') : <q-args>)