0

是的,这个标题是我能想到的最好的:-)

我有一个文本,当激活拼写检查时,很多单词自然会突出显示。像电子邮件、地址、姓名等。如何告诉 Vim 某个单词没问题,而不将其添加到单词表中。

意思是,只是在编辑此文档时,我不想看到我的名字被突出显示。

4

3 回答 3

3

尝试:zG

:help internal-wordlist
于 2012-09-23T04:14:59.450 回答
0

我在 git 存储库中有我的 Vim 配置,这对几件事很有用;例如,您可以将您的别名vim命名为正常调用 Vim 的小脚本,但在 Vim 完成后检查~/.vim/spell目录是否有任何修改,如果有,询问您是否要保留或丢弃它们。如果您想保留它们,它可以自动提交所有内容spell,否则会重置其中的所有内容。因此,除非您确实使用拼写检查器,否则您通常不会被该脚本打扰。

唯一的缺点是您不能在一个会话中同时对字典进行持久性和易失性添加。

于 2012-09-23T04:04:25.043 回答
0

来自http://vimdoc.sourceforge.net/htmldoc/spell.html

zg 将光标下的单词作为好词添加到“spellfile”中的名字。计数可以在命令之前指示要使用的 'spellfile' 中的条目。计数二使用第二个条目。

        In Visual mode the selected characters are added as a
        word (including white space!).
        When the cursor is on text that is marked as badly
        spelled then the marked text is used.
        Otherwise the word under the cursor, separated by
        non-word characters, is used.

        If the word is explicitly marked as bad word in
        another spell file the result is unpredictable.
于 2012-09-23T03:32:41.653 回答