• # Activation sur demande

    Posté par . En réponse au message [Éditeur/Vim] Correction orthographique avec Vim. Évalué à 1.

    Si comme moi vous n'aimez pas qu'on vous rappelle constamment votre pitoyable niveau en orthographe, voici une fonction simple pour activer/désactiver la correction à la demande en appuyant sur <F10> (à recopier dans votre .vimrc):
    " Toggle option 'spell'
    function! ToggleSpell()
     if &spell
     set nospell
     else
     set spell
     end
    endfunction
    noremap <F10> :call ToggleSpell()<cr>
    inoremap <F10> <Esc>:call ToggleSpell()<cr>a