gpt4 book ai didi

vim - 如何在VIM中正确设置spellfile?

转载 作者:行者123 更新时间:2023-12-02 02:33:05 25 4
gpt4 key购买 nike

我正在尝试在 vim 中使用拼写检查器;如果我想通过 zg 命令向内部词典添加一个单词(这样它就不会突出显示为错误),它会显示 "optionpellfile is not设置”

我尝试输入:setpellfile=PATH.../.vim.spell,

但我总是得到“无效参数:spellfile=PATH.../.vim.spell”。有什么提示吗?

我使用的是 Linux Ubuntu 12.04。

最佳答案

您不能选择任意名称。 :help 'spellfile' 说:

It must end in ".{encoding}.add".

因此,请使用如下语法(并确保 spell 目录存在):

:set spellfile=~/.vim/spell/en.utf-8.add

对于编码,请检查 :set encoding? (从技术上讲,它是缓冲区本地 'fileencoding' 设置,但大多数默认为前者。)

关于vim - 如何在VIM中正确设置spellfile?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24054491/

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