I use vim's spellchecking feature. Given that I work with many technical terms and LaTeX commands, I tend to add many them to my personal dictionary in ~/.vim/spell/en.utf-8.add.I would like to share this file across multiple machines, so that when I add a word to the file on one machine, it is also added on other machines, and I don't need to add it once on each machine. I tried versioning ~/.vim/spell/en.utf-8.add in git, but this does not seem to work: vim does not pick up the new terms. I suspect that vim also needs the file en.utf-8.add.spl to be edited somehow, but as this file is binary, versioning it will probably lead to conflicts.Does anyone here have a satisfactory solution to have vim spellcheck dictionary additions as part of their config, and synchronising them between all of their machines?
How to share vim spellchecking additions between multiple machines?
spell checking
Vim uses the spl file to do the checks, and the spl file is generated from the add file.  We can speculate on whether the spl file is portable across different machines and Vim versions, but it's easier (and safer) to re-generate it as needed.  Now, the spl file is re-generated automatically when you add words to your local dictionary from within Vim, but you must run mkspell to re-generate it if you edit the add file directly.With that in mind, you can do something like this: synchronize the add file by whatever means (with git, rsync, NFS, or whatever), and add these commands to your vimrc on all machines:for d in glob('~/.vim/spell/*.add', 1, 1)    if filereadable(d) && (!filereadable(d . '.spl') || getftime(d) > getftime(d . '.spl'))        exec 'mkspell! ' . fnameescape(d)    endifendforThis will re-generate the spl file at Vim startup whenever the corresponding add file is newer than it.