gpt4 book ai didi

vim - 如何在 vim 中标记要用不同语言进行拼写检查或根本不检查的 block ?

转载 作者:行者123 更新时间:2023-12-01 11:22:12 24 4
gpt4 key购买 nike

我正在 Vim 中编辑文档。有些部分是英语,有些是荷兰语。比方说,我有以下内容

A common form of lorem ipsum reads:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

"Lorem ipsum" text is derived from sections 1.10.33 of Cicero's De finibus bonorum et malorum.

现在,在进行拼写检查时,我想将第二段(或任何 block ,真的)标记为用不同的语言进行拼写检查。或者,或者,根本不进行拼写检查。这可能吗?

有问题的文档是markdown。

最佳答案

I'd like to mark the second paragraph (or any block, really) to be spellchecked in a different language.

对此有一个简单但不令人满意的答案:你不能这样做。抱歉:-(

最好的方法是使用 :set spelllang=en_gb,nl,这样它会检查两种语言:

enter image description here


alternatively, to not be spellchecked at all

可以通过使用contains=@NoSpell 添加一个新语法组来完成。参见 :help :syn-spell .不过,它确实要求您制定一些语法规则。

另见 Is it possible to turn on spell-checking for only parts of buffers?以及this answer举一些例子。

关于vim - 如何在 vim 中标记要用不同语言进行拼写检查或根本不检查的 block ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40833281/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com