spell checking - Is it possible to toggle a vim option when switching to insert mode? -
i discovered spell option this answer on code review, , feel option both useful (while editing) , annoying (while reading code, because of false positives).
i somehow enable option automatically when switching insert mode:
set spell
and disable automatically when switching normal mode:
set nospell
adding following commands in .vimrc
should trick (as long not using ctrl+c leave insert mode) :
autocmd insertenter * setlocal spell autocmd insertleave * setlocal nospell
since great trick, have added these lines .vimrc
!
if want rid of words being highlighted, can add them "good" word list putting cursor on them , type zg
. see :help spell
for more information
Comments
Post a Comment