Thursday, July 5, 2012

Re: background color when cursor over letter in highlighted match

On 05/07/12 13:44, Nick Shyrokovskiy wrote:
> Hi everyone.
>
> Here is my problem.
> 1. When the cursor is over non-highlighted letter the bg=w and fg=b(
> inverted relative to when the cursor in not over this letter)
> 2. When the cursor is over a letter in search-highlight, the letter colors
> again bg=w and fg=b
>
> ***but***
> 3. When the cursor is over match-highlight the letter is just normal
> bg=b and fg=w.
>
> So in the latter case when the cursor at the border of match highligth it
> visually merges with non-highlighted letter.
>
> Is there a way to fix it?
>

What do you mean, bg=w fg=b ? I don't know about them. Try to write out
your colours in full. If you define your match highlight with
ctermbg=7 ctermfg=0 guibg=black guifg=white
as arguments to your :highlight command, you'll get constant colours for
your match. But if the next character happens to use the same colours,
or the same background and a "space" character, the boundary won't be
obvious.

The same applies to
ctermbg=fg ctermfg=bg guibg=fg guifg=bg
with the additional boon that it will set inverse colours to whatever
the Normal group is set to when defining this new colour group (and thus
take into account any colourscheme already set, or the fact that a cterm
may have 'background' set to "light" though a text console will usually
have it set to "dark")

If you use
cterm=reverse gui=reverse

you'll get (IIUC) the inverse-video of whatever is set by the underlying
syntax.


Best regards,
Tony.
--
Those of you who think you know everything are very annoying to those
of us who do.

--
You received this message from the "vim_use" 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

No comments: