On 14-Feb-2012 13:44:56 -0800 (PST), Alexey wrote:

> On Feb 14, 10:12 pm, Taylor Hedberg <tmhedb...@gmail.com> wrote:
>> Alexey, Tue 2012-02-14 @ 12:12:28-0800:
>>
>>> I wanted to ask this in user list first, but have not yet received a
>>> response to my subscription request.
>>
>>> I've found no obvious way to enable highlighting in colorcolumn's.
>>
>>> I have set colorcolumn=79,80, and tried to set highlighting of
>>> trailing whitespace with
>>
>>> syntax match WhitespaceAtEOL /\s\+$/
>>
>>> When the trailing whitespace happens in columns 79 or 80, the
>>> background color does not change, it stays ColorColumn, and i do not
>>> see how to override this.
>>
>>> I think the highlighting set with colorcolumn should have the lowest
>>> priority, or at least there should be an option to set its priority.
>>
>> I think 'colorcolumn' is like 'cursorline', in that its special
>> highlighting is hard-coded to take precedence over most "background"
>> syntax highlighting. I normally have 'cursorline' turned on, and my
>> `ctermbg=...` highlighting never shows through the cursorline
>> highlighting. It's irritating, but I think it would take patching Vim to
>> change it, and I haven't yet been sufficiently motivated to dig into
>> that.
> 
> Taylor,
> thanks for the explanation.
> 
> Then i would vote for being able to set the priority of highlighting
> colorcolumn and cursorline, or setting them to the lowest priority.
> 
> Alexey.

I had once brought this up (in 2007,
http://groups.google.com/group/vim_dev/browse_thread/thread/46c70a229488de20).
Back then, Bram was against it:

> Having the syntax background color overrule the 'cursorline'
> background color will result in the cursorline to be broken in pieces or
> hardly viewable.  E.g., when you have a background color for strings and
> a line is mostly filled with a string.  This looks weird if you move the
> cursor up/down. 

I am still in favor of it, though I have addressed my most pressing need for
this in another way: I use a plugin to highlight multiple searches, and I have
since taken up maintenance of the Mark plugin
(http://www.vim.org/scripts/script.php?script_id=2666), and rewriting the
highlighting from :syntax to matchadd() has fixed the problem, because
matchadd() allows to specify the {priority}. That may be a suitable workaround
for you, too.

Nonetheless, I still think making the priority of 'cursorline' et al.
configurable would be a great addition. And BTW, the Windows console version of
Vim somehow has the priorities mixed up; I'll submit a defect.

-- regards, ingo

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui