mb1*_*b14 10
您可以定义语法元素以忽略拼写检查.
" Ignore CamelCase words when spell checking
fun! IgnoreCamelCaseSpell()
syn match CamelCase /\<[A-Z][a-z]\+[A-Z].\{-}\>/ contains=@NoSpell transparent
syn cluster Spell add=CamelCase
endfun
autocmd BufRead,BufNewFile * :call IgnoreCamelCaseSpell()
Run Code Online (Sandbox Code Playgroud)
请注意,autocmd
必须确保在加载文件类型的语法定义后加载语法规则(因为语法规则会消除任何现有的语法规则).
但是我个人更喜欢将它们添加(zg
好),所以我可以检查没有拼写错误而不是忽略所有内容.