Such a nice recursion, editing a ikiwiki blog article about ViM using ViM. This article is how to enable and use spellchecking usage in ViM. I have been using ViM for almost a decade now and ViM is the editor of my choice, however recently I found out I did not know I need spellchecking, but I need it definitely.

Enabling in-line spell-checking in ViM while editing a file:

:setlocal spell spelllang=en_gb

Configuring in-line spell-checking in ~/.vimrc for specific file types, here .mdwn markup files:

autocmd BufRead,BufNewFile *.md setlocal spell spelllang=en_gb

By turning on spell-checking in the ~/.vimrc, turning on word completion would be good as well. While typing a word and pressing CTRL-N or CTRL-P in ViM insert mode the editor will suggest possible auto-completion words.

set complete+=kspell

And this is how it looks in-line in a in a shell while editing: ViM auto completion

Words that are not recognized by ViM or/and are written wrong, will appear written with white letters at a red background. While being in visual mode auto correction can be used by pressing the z= combination. A window with know suggestions will appear to correct that word.

Sometimes words are still being marked as wrong even if they are written correctly. New words can be added in the visual mode by using the zg command. Both commands work properly only if the cursors is at the position of the marked word in ViM.