2

1) To underline misspelled words, I can execute the following in an open buffer:

:hi clear SpellBad
:hi SpellBad cterm=underline
:set spell

2) However, if I write in my .vimrc the first two lines, namely:

:hi clear SpellBad
:hi SpellBad cterm=underline

and when I open a file, I execute :set spell, misspelled words are highlighted in color, but not underlined.

Why are the .vimrc settings in 2) overridden? How can I get the same result as in 1)?

4

They are likely overridden by your colorscheme of choice (even if it is default).

My suggested fix is

augroup colors
  au!
  au ColorScheme * hi whatever
augroup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.