使用:set spell启用拼写检查。如果是源代码,gvim就足够聪明,只能拼写检查注释和字符串文字。
:help spell
会给你所有的细节。这里有一些片段:
To search for the next misspelled word: ]s Move to next misspelled word after the cursor. A count before the command can be used to repeat. 'wrapscan' applies. [s Like "]s" but search backwards,find the misspelled word before the cursor.
Finding suggestions for bad words: z= For the word under/after the cursor,suggest correctly spelled words.
To add words to your own word list: zg Add word under the cursor as a good word
有关更改字典以包括其他区域,语言或单词集(例如,医学术语)的信息,请参阅:help set spelllang
。
gvim必须用|编译语法|。
我不把:set spell在我的.vimrc,因为当我编码在我的注释中有太多的变量名称被标记。如果有一个特定的文件类型,你想检查使用一个自动命令在.vimrc。或者只是在需要时手动打开它。
原文地址:https://www.jb51.cc/vim/390773.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。