2010-09-29 6 views
1

J'utilise vim depuis longtemps, mais récemment j'ai construit un nouveau serveur, et quand j'ai ouvert vim, j'ai trouvé qu'il n'utilisait pas mon fichier de sort.Vim utilisant le mauvais fichier de sort?

Historiquement vim chargerait ~/.vim/spell/en.utf-8.add comme son fichier de sort, mais quand j'ai essayé d'ajouter un mot au dictionnaire, il l'a ajouté à en.latin1.add à la place.

ls ~/.vim/spell 
en.latin1.add en.latin1.add.spl en.utf-8.add 

donc comme une solution possible, je mets set spelllang=en.utf-8 dans mon vimrc. Mais au lieu d'essayer alors d'utiliser en.utf-8.add, il a utilisé en.utf-8.latin1.add. Comment transformer ce latin1 en utf-8?

également comme une note de côté, voici mes variables d'environnement:

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" 

Répondre

2

De la documentation (:help spell-load):

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. 

Malgré vos variables d'environnement tout UTF-8 liste, il semble que Cependant, le encoding de Vim est défini sur "latin1" ou "iso-8859-15". Peut-être que vous pourriez définir l'encodage de Vim manuellement en exécutant :set encoding=utf-8.

+0

Malheureusement, la modification de l'encodage ne résout pas le problème. – icco