Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
1  
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: groups.google.com/group/vim_dev/browse_thread/thread/… –  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
show 1 more comment

Your Answer

 
discard

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.