I have in my .vimrc
:
hi SpellBad ctermfg=7 ctermbg=0* cterm=underline
hi Nonascii ctermbg=Black ctermfg=Red cterm=none
hi [...]
Some config files I need to look at contains so many unknown words that the highlighting defined in that highlighting group actually becomes a hindrance for visualization.
I am not looking for :syntax off
followed by :syntax on
. Obviously for any highlight group I could just issue :hi clear highlight-group
. But then I'd be left with how to restore highlighting within the same session, without having to type in the exact line as it stands in the .vimrc
file.
Any thoughts on how to selectively (exclusively) turn off and back on specific highlight groups, within a vim
session, would be appreciated.
Edit:
Just to be precise, I mean the question to be more general than just its specialization to the SpellBad highlight group. I have a few other highlight groups that I need to turn off and on from within a session.
set spell
in yourvimrc
? If yes, remove it. If no, you can check who setspell
by executing:verbose set spell?
.set spell!