E763 error on Vim for Mac OS X

I had this on Yosemite, but probably the same error exists on Mavericks, Mountain Lion, Lion, Leopard, Snow Leopard, etc.

When you’re working in Vim in the Terminal, at one point you might want to use the spell checker. And maybe you want to do this in another language than English. Vim nicely downloads your language files automagically (with set spell), but then you’re SOL:

E763: Word characters differ between spell files

The problem is Vim ships with an old version of the English-language files (the file has an old encoding). Long story short, nobody explains how to fix this on OS X, so here it is.


The method below no longer works, because Apple has changed the working of sudo. Some files are no longer allowed to be edited even by a SuperUser. Anyway: Mac ships with Vim 7.3, eventhough 7.4 is out. And Vim has been surpassed by Neovim. So use Brew to install Neovim.

First we move the old language files to a temporary location (where they’ll be auto deleted when you restart your Mac):

sudo mv /usr/share/vim/vim73/spell/en.* /tmp

Now we re-download English and other languages in Vim (it automatically makes .vim/spell for you where it’ll store the language files). In vim, set:

:set spell

(downloading English automatically)

:set spelllang=nl

(and the language of your choice)

You can set these commands in your .vimrc so they’re always on for you.