Archive for November, 2006

using F5 to toggle spellcheck in vim 7

Wednesday, November 29th, 2006

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