Create a spell file for VIM

Since version 7, VIM has the ability to spell check documents on the fly. By default VIM only contains an English dictionary. To add another dictionary:

Open this URL:

Select the dictionary you want to use. For this example I will use the French dictionary: French (France) Réforme 1990.

Download the dictionary and unpack it:

$ unzip
  inflating: fr_FR.aff
  inflating: fr_FR.dic
  inflating: README_fr_FR.txt

Then launch VIM and compile the dictionary:

:mkspell fr fr_FR

fr is the locale of the dictionary and fr_FR the file-names of the dictionary (without the .aff & .dic extension). If the dictionary files were named foo.dic foo.aff you would type:

:mkspell fr foo

VIM will generate a file named fr.utf-8.spl (the utf-8 string might change depending on your locale).

Copy the generated dictionary to /usr/share/vim/vim71/spell or even better to $HOME/.vim/spell/.

Then launch VIM, open the document to spell check and type:

:set spell spelllang=fr

And you have on the fly French spell checking directly in VIM!

More details in the VIM documentation.