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



















