After having this working for a while, I thought I’d share this section from my .vimrc:
inoremap <silent> <F5> <c -O>:call SpellToggle()<cr>
map <silent> <F5> :call SpellToggle()<cr>
function SpellToggle()
if &spell == 1
set nospell
else
set spell
endif
endfunction
Thanks!
Hi, is there a way to make it work in insert mode as well?
hi Massimo – this works for me in insert mode too; no changes required.
You can use ‘:set spell!’ to toggle spelling as well.