Vim使用了错误的拼写文件?

Vim使用了错误的拼写文件?,vim,spell-checking,Vim,Spell Checking,我已经使用vim很长时间了,但最近我构建了一个新服务器,当我打开vim时,我发现它没有使用我的拼写文件 历史上,vim会加载~/.vim/spell/en.utf-8.add作为拼写文件,但当我尝试向字典添加一个单词时,它将其添加到en.latin1.add ls ~/.vim/spell en.latin1.add en.latin1.add.spl en.utf-8.add 因此,作为一种可能的修复方法,我将set spelllang=en.utf-8放入我的vimrc中。但是它没有尝

我已经使用vim很长时间了,但最近我构建了一个新服务器,当我打开vim时,我发现它没有使用我的拼写文件

历史上,vim会加载
~/.vim/spell/en.utf-8.add
作为拼写文件,但当我尝试向字典添加一个单词时,它将其添加到
en.latin1.add

ls ~/.vim/spell
en.latin1.add  en.latin1.add.spl  en.utf-8.add
因此,作为一种可能的修复方法,我将
set spelllang=en.utf-8
放入我的vimrc中。但是它没有尝试使用
en.utf-8.add
,而是使用
en.utf-8.latin1.add
。如何将拉丁语1转换为utf-8

另请注意,以下是我的环境变量:

declare -x LANG="en_US.UTF-8"
declare -x LC_ADDRESS="en_US.UTF-8"
declare -x LC_ALL=""
declare -x LC_COLLATE="C"
declare -x LC_CTYPE="en_US.UTF-8"
declare -x LC_IDENTIFICATION="en_US.UTF-8"
declare -x LC_MEASUREMENT="en_US.UTF-8"
declare -x LC_MESSAGES="en_US.UTF-8"
declare -x LC_MONETARY="en_US.UTF-8"
declare -x LC_NAME="en_US.UTF-8"
declare -x LC_NUMERIC="en_US.UTF-8"
declare -x LC_PAPER="en_US.UTF-8"
declare -x LC_TELEPHONE="en_US.UTF-8"
declare -x LC_TIME="en_US.UTF-8"
从文档()中:


尽管您的环境变量都列出了UTF-8,但看起来Vim的
编码设置为“latin1”或“iso-8859-15”。也许您可以通过运行
:set encoding=utf-8

手动设置Vim的编码。遗憾的是,更改编码仍然无法解决问题。
Vim searches for spell files in the "spell" subdirectory of the directories in
'runtimepath'.  The name is: LL.EEE.spl, where:
    LL  the language name
    EEE the value of 'encoding'
...
...
...
Exceptions:
- Vim uses "latin1" when 'encoding' is "iso-8859-15".  The euro sign doesn't
  matter for spelling.