Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am sort of new to vim, and I have a simple question:

I'm using vim for editing .tex documents and I am using spell checker (spell). The problem is that when cursorline is enabled I can't see the SpellBad highlighting for that line, is there any way to change the SpellBad highlighting to, for example, a red curly underline (or just make the highlighting appear when cursorline is enabled)?

share|improve this question
up vote 1 down vote accepted

In GVIM, the curly underlining is the default for spelling errors, so I guess you're concerned about terminal Vim.

Terminals only support a limited number of attributes; usually colors, underline, many also bold, but not curly underlining. To work with the cursorline, you need to choose a differing attribute; i.e. when you use a different background color for the cursorline, you cannot indicate spell errors via a background color, but may choose underlining.

You can modify the colors (after any :colorscheme command) in your ~/.vimrc, like this:

:hi SpellBad cterm=underline

See :help :hi for details.

share|improve this answer
Thank you for the answer. Can you color the underline or make it bolder? – user1026044 May 7 '13 at 13:10
You'd have to choose a different font in your terminal emulator. The color cannot be set differently, AFAIK; the terminal stuff is 1960's technology :-) – Ingo Karkat May 7 '13 at 13:20
Ok :p. But when i do searches the highlighting is still present when i hold the cursor on the same line (i.e. the cursorline option does not hide the highlighting) how can i recreate that type of effect for my SpellBad? – user1026044 May 7 '13 at 13:21
Unfortunately, you can't. The Search highlighting is hard-coded to have higher priority than the cursorline. I wish it were different, and had raised this once:… – Ingo Karkat May 7 '13 at 13:34
Uhhh, that sucks. If i understand you correctly the priority is: search-highlighting > cursorline highlighting > custom highlighting (ex. hi SpellBad)? Isn't there some plugin out there that creates a custom cursorhighlighting with low priority? – user1026044 May 7 '13 at 13:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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