问题
How do I get regional spell-files for vim? I want e.g. de_DE
as spell language. The help suggests using http://extensions.services.openoffice.org/dictionary but I don't get how to create a spell file from them. I also found https://github.com/ganwell/vim-hunspell-dicts but the instructions don't help either.
回答1:
Vim helpfully includes the spellfile.vim plugin to automatically download missing spellfiles:
:set spelllang=de_DE
:set spell
Cannot find spell file for "de" in utf-8
Do you want me to try downloading it?
(Y)es, [N]o: Y
Downloading de.utf-8.spl...
:!curl 'http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.spl' -o '/tmp/vRnqpoy/2.spl'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
"/tmp/vRnqpoy/2.spl" [noeol] 5996L, 2388148C
In which directory do you want to write the file:
1. /home/martin/.vim/spell
[C]ancel, (1): 1
"~/.vim/spell/de.utf-8.spl" [New] 5996L, 2388149C written
If this doesn't work for you then try using :verbose set spell
to see why the plugin isn't downloading anything.
来源:https://stackoverflow.com/questions/40556649/gettings-spellfiles-in-vim