CursorLine and SpellBad colors interfere

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CursorLine and SpellBad colors interfere

Benjamin Esham
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I am the maintainer of the biogoo color scheme [1] and a user recently
e-mailed me to remark that when 'cursorline' is on and the current line
includes a misspelled word, that word disappears (it's displayed as white
text on a white background).  The relevant lines are

hi CursorColumn  guibg=#ffffff
hi CursorLine    guibg=#ffffff
hi SpellBad      guifg=#ffffff guibg=#7f0000 gui=undercurl guisp=#d6d6d6

I could just set CursorLine and Column always to use black text, but that
would pretty much destroy highlighting on the current line (this color
scheme mostly differentiates different elements by using different text
colors).  Is there any way to do conditional processing so that the color of
SpellBad text changes if the CursorLine is intersecting it?

(If not, I could change SpellBad to be dark red text on a light background,
so that such words are still apparent with the CursorLine on.)

[1] http://www.vim.org/scripts/script.php?script_id=432

Cheers,
- --
Benjamin D. Esham   |   [hidden email]
He has all the virtues I dislike and none of the vices I admire.
                                — Winston Churchill (attributed)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (Darwin)

iEYEARECAAYFAkxoY1YACgkQzOC3TdZ2u5pA1wCfUP95UcWdq13PiBXYEZc7UIHF
qDUAni0qrRkdnqeTwi64ItDswxgEAQtG
=ZtRp
-----END PGP SIGNATURE-----

--
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
Reply | Threaded
Open this post in threaded view
|

Re: CursorLine and SpellBad colors interfere

Tony Mechelynck
On 15/08/10 23:59, Benjamin Esham wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> I am the maintainer of the biogoo color scheme [1] and a user recently
> e-mailed me to remark that when 'cursorline' is on and the current line
> includes a misspelled word, that word disappears (it's displayed as white
> text on a white background).  The relevant lines are
>
> hi CursorColumn  guibg=#ffffff
> hi CursorLine    guibg=#ffffff
> hi SpellBad      guifg=#ffffff guibg=#7f0000 gui=undercurl guisp=#d6d6d6
>
> I could just set CursorLine and Column always to use black text, but that
> would pretty much destroy highlighting on the current line (this color
> scheme mostly differentiates different elements by using different text
> colors).  Is there any way to do conditional processing so that the color of
> SpellBad text changes if the CursorLine is intersecting it?
>
> (If not, I could change SpellBad to be dark red text on a light background,
> so that such words are still apparent with the CursorLine on.)
>
> [1] http://www.vim.org/scripts/script.php?script_id=432
>
> Cheers,
> - --
> Benjamin D. Esham   |   [hidden email]
> He has all the virtues I dislike and none of the vices I admire.
>                                  — Winston Churchill (attributed)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.9 (Darwin)
>
> iEYEARECAAYFAkxoY1YACgkQzOC3TdZ2u5pA1wCfUP95UcWdq13PiBXYEZc7UIHF
> qDUAni0qrRkdnqeTwi64ItDswxgEAQtG
> =ZtRp
> -----END PGP SIGNATURE-----
>

Or maybe use a more distinctive undercurl, and dispense with guibg guifg
in the SpellBad highlight altogether? Something like

        hi SpellBad gui=undercurl guisp=red

perhaps?

Another possibility is to have CursorLine and CursorColumn differ only
slightly from the Normal bg color: for instance, I have Normal set to
use guibg=white guifg=black (the gvim default), and my CursorLine and
CursorColumn use guibg=#F4F4F4 (about 96% grey, which I can still see
against the white bg, but doesn't disturb me when I'm looking for
something else) and guifg omitted so most syntax colours remain distinctive.


Best regards,
Tony.
--
While having never invented a sin, I'm trying to perfect several.

--
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
Reply | Threaded
Open this post in threaded view
|

Re: CursorLine and SpellBad colors interfere

Benjamin Esham
Tony Mechelynck wrote:

> On 15/08/10 23:59, Benjamin Esham wrote:
>
>> I am the maintainer of the biogoo color scheme [1] and a user recently
>> e-mailed me to remark that when 'cursorline' is on and the current line
>> includes a misspelled word, that word disappears (it's displayed as
>> white text on a white background). [...]
>>
>> I could just set CursorLine and Column always to use black text, but
>> that would pretty much destroy highlighting on the current line (this
>> color scheme mostly differentiates different elements by using different
>> text colors).  Is there any way to do conditional processing so that the
>> color of SpellBad text changes if the CursorLine is intersecting it?
>>
>> (If not, I could change SpellBad to be dark red text on a light
>> background, so that such words are still apparent with the CursorLine
>> on.)
>>
>> [1] http://www.vim.org/scripts/script.php?script_id=432
>>
> Or maybe use a more distinctive undercurl, and dispense with guibg guifg
> in the SpellBad highlight altogether? Something like
>
> hi SpellBad gui=undercurl guisp=red
>
> perhaps?
>
> Another possibility is to have CursorLine and CursorColumn differ only
> slightly from the Normal bg color: for instance, I have Normal set to use
> guibg=white guifg=black (the gvim default), and my CursorLine and
> CursorColumn use guibg=#F4F4F4 (about 96% grey, which I can still see
> against the white bg, but doesn't disturb me when I'm looking for
> something else) and guifg omitted so most syntax colours remain
> distinctive.
Hi Tony,

I ended up going with inverting the previous spelling colors, so that e.g. a
spelling error is dark red text (with a dark red undercurl) on a light gray
background, instead of light gray with a light gray undercurl on a dark red
background.  That seems to have fixed the problem with CursorLine et al.

Cheers,
--
Benjamin D. Esham   |   [hidden email]
“I cannot and will not cut my conscience to fit this year’s
fashions.”                                     — Lillian Hellman


PGP.sig (201 bytes) Download Attachment