Home » Questions » Computers [ Ask a new question ]

To spellcheck my code in Vim for English/German/Finnish

To spellcheck my code in Vim for English/German/Finnish

How can you spellcheck your LaTeX document for English/German/Finnish?

Asked by: Guest | Views: 255
Total answers/comments: 2
Guest [Entry]

"I think you can setup multiple spelling files in VIM to work together.

set spelllang=en,de

Read up the VIM pages for configurations (and, if required, creation of new spelling files)
You may need to fetch some of the .spl spelling files if they are not available in your spell/ directory
Check specifically, spl files, sug files, spellang, spellsuggest

You can also check Vimchant : Fast on-the-fly spell-checker based on Enchant

Using latexmk, vim spell checking and vim latex-suite
(it also refers to Sourceforge Kile, an Integrated LaTeX Environment)"
Guest [Entry]

"Here is what I am using in my Makefile to invoke hunspell (notice the -t parameter for LaTeX compatibility):

spell-check: $(FILE).tex
hunspell -d en_GB -t $<

You have to check the available dictionaries on your system (on my Ubuntu I used 'locate .dic'). And I suppose you can create a macro in vim to call this specific command.

Edit:

Hunspell has its own dictionaries (see the list of hunspell dictionaries), and you can use myspell dictionaries as well, as hunspell is based on myspell"