Full paths are not allowed in spelllang, only the lang names.
In the ./spell/ directory the files are named using the 'lang' which in
the case of wordy is the dict name.
This patch drops the actual lang from the .spl path, and only passes
the dict names to spelllang.
NOTE: I am not a vimscript expert, this solution works for me when
loading vim-wordy using pathogen. Closes issue #33
Use tempname() for portably obtaining a temporary filename.
Use map() instead of a for-loop.
Add comment explaining the purpose of the newly added code.
Add l: prefix to keep coding style in-line with rest of code.
The dic file is read in a list, a new list is created with
the "!" replaced with "?", the new list is saved in a temporary
file, which is used as the dic file. Finally, after used, the
temporary file is deleted.
This change marks all words in all dictionaries as rare words so that
NeoVim highlights them as SpellRare instead of SpellBad. This lets you
distinguish between wordy writing and normal misspellings, respectively.
In order for this to work, your NeoVim needs to be patched as follows:
https://github.com/neovim/neovim/pull/2456https://groups.google.com/forum/#!topic/vim_dev/rPWOoR3ZgSA
See `:help spell-wordlist-format` for details about dictionary markings.