My spelling config in .vimrc
I jump between English and Portuguese in my writings and it is nice to have a spellchecker working to catch typos. In vim, I just have the following three lines in .vimrc mapping F10 (disable), F11 (Portuguese) and F12 (English) for the local buffer. I don't use a global setting with :set
because coding doesn't need the spelling turned on. My Leader key is Space.
nmap <Leader><F12> <Esc>:setlocal spell spelllang=en_gb<CR>
nmap <Leader><F11> <Esc>:setlocal spell spelllang=pt_pt<CR>
nmap <Leader><F10> <Esc>:setlocal nospell<CR>