desert colorscheme's "Ignore" highlight has wrong guifg setting...

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

desert colorscheme's "Ignore" highlight has wrong guifg setting...

R Sam
To whoever maintains the "desert" colorscheme distributed with vim:

We just recently hit an issue while running Brett Stahlman's excellent script "txtfmt" where hidden tokens where showing up in the buffer.

It turned out to be an issue with the Ignore group's highlight setting. The desert colorscheme has its background set as guibg=grey20, while its Ignore group highlight has its guifg=grey40. I manually set it as guifg=bg in my .vimrc and the ignore works fine now. The txtfmt scripts hidden tokens now stay hidden.

Just a note of FYI.

Regards,
-Sam


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Stahlman Family



R Sam wrote:
> To whoever maintains the "desert" colorscheme distributed with vim:
>
> We just recently hit an issue while running Brett Stahlman's excellent
> script "txtfmt" where hidden tokens where showing up in the buffer.

Note that this affects more than just the txtfmt plugin. For example,
the *...* and |...| pairs surrounding tags in a help file will be
visible as well.

Brett Stahlman

> It turned out to be an issue with the Ignore group's highlight setting. The
> desert colorscheme has its background set as guibg=grey20, while its Ignore
> group highlight has its guifg=grey40. I manually set it as guifg=bg in my
> .vimrc and the ignore works fine now. The txtfmt scripts hidden tokens now
> stay hidden.
>
> Just a note of FYI.
>
> Regards,
> -Sam
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Matt Wozniski-2

CC'ing desert.vim maintainer.

On Thu, Feb 12, 2009 at 8:14 PM, Stahlman Family wrote:
> R Sam wrote:
>> To whoever maintains the "desert" colorscheme distributed with vim:
[...]
>> It turned out to be an issue with the Ignore group's highlight setting.
>
> Note that this affects more than just the txtfmt plugin. For example,
> the *...* and |...| pairs surrounding tags in a help file will be
> visible as well.

I'd stop short of calling this a bug, though.  My colorscheme of
choice sets Ignore to something visible-but-light, and I rather like
it that way - let's me see the "hidden" things if I look closely,
without getting in my way.

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

panshizhu
In reply to this post by R Sam

R Sam 写道:
> To whoever maintains the "desert" colorscheme distributed with vim:
>
> It turned out to be an issue with the Ignore group's highlight setting. The
> desert colorscheme has its background set as guibg=grey20, while its Ignore
> group highlight has its guifg=grey40. I manually set it as guifg=bg in my
> .vimrc and the ignore works fine now. The txtfmt scripts hidden tokens now
> stay hidden.

This is not a bug, it is a "feature" IMO, I learned from desert scheme
and use this feature in my own color scheme.

The reason not to set fg=bg for Ignore, is that we actually need to know
there's some text at the hidden area. And we know we can ignore it since
the color very close to background. Think that in a GUI, you will see
disabled menu items anyway, and they're Grey color instead of just hidden.

Another reason may be: in some terminal the cursor always has the same
color as the foreground, if fg=bg you will not be able to see the cursor
at all. Unfortunately, not all terminal emulators will let you define
the cursor color. So it is better not to let fg=bg, or your cursor will
disappeared at the ignored character.



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Stahlman Family



pansz wrote:

> R Sam 写道:
>> To whoever maintains the "desert" colorscheme distributed with vim:
>>
>> It turned out to be an issue with the Ignore group's highlight setting. The
>> desert colorscheme has its background set as guibg=grey20, while its Ignore
>> group highlight has its guifg=grey40. I manually set it as guifg=bg in my
>> .vimrc and the ignore works fine now. The txtfmt scripts hidden tokens now
>> stay hidden.
>
> This is not a bug, it is a "feature" IMO, I learned from desert scheme
> and use this feature in my own color scheme.

 From the Vim help...
To be able to allow each user to pick his favorite set of colors, there
must be preferred names for highlight groups that are common for many
languages. These are the suggested group names (if syntax highlighting
works properly you can see the actual color, except for "Ignore"):
.
.
        *Ignore left blank, hidden

Note in particular the `...can see the actual color, except for
"Ignore"' and 'hidden'. Whether we call it a bug or not, it is
definitely a departure from the Vim default for the Ignore group, which
sets guifg=bg. While I understand the rationale you've presented, I
guess my view is that colorschemes should change the colors themselves,
but not the "meaning" of the default group. The Ignore group, to me,
implies ignorance of something's existence: i.e., the invisibility of
the thing being ignored. One of the  classic uses of Ignore is to hide
characters `*' and `|' when they surround tags in a helpfile. Is there
really any reason to see such things at all? The idea is to make it
appear that the help keywords are "magically" highlighted. Of course, if
you don't like such magic, you can always (well, perhaps not always, as
you point out) put your cursor on the character and see it, since the
cursor is usually a different color from foreground and background.

At any rate, I'll look at putting a workaround in txtfmt: i.e.,
something that will not rely upon the Ignore group to hide things...

Thanks,
Brett S.

>
> The reason not to set fg=bg for Ignore, is that we actually need to know
> there's some text at the hidden area. And we know we can ignore it since
> the color very close to background. Think that in a GUI, you will see
> disabled menu items anyway, and they're Grey color instead of just hidden.
>
> Another reason may be: in some terminal the cursor always has the same
> color as the foreground, if fg=bg you will not be able to see the cursor
> at all. Unfortunately, not all terminal emulators will let you define
> the cursor color. So it is better not to let fg=bg, or your cursor will
> disappeared at the ignored character.
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Matt Wozniski-2

On Fri, Feb 13, 2009 at 7:43 AM, Stahlman Family wrote:
> One of the  classic uses of Ignore is to hide
> characters `*' and `|' when they surround tags in a helpfile. Is there
> really any reason to see such things at all?

Learning how to write helpfiles, for one - a lot of the constructs
aren't documented, short of looking at a help file yourself, or
looking at syntax/help.vim.

> At any rate, I'll look at putting a workaround in txtfmt: i.e.,
> something that will not rely upon the Ignore group to hide things...

Easy enough, just adding a highlight group that you know is invisible.

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Tony Mechelynck
In reply to this post by Matt Wozniski-2

On 13/02/09 06:53, Matt Wozniski wrote:

> CC'ing desert.vim maintainer.
>
> On Thu, Feb 12, 2009 at 8:14 PM, Stahlman Family wrote:
>> R Sam wrote:
>>> To whoever maintains the "desert" colorscheme distributed with vim:
> [...]
>>> It turned out to be an issue with the Ignore group's highlight setting.
>> Note that this affects more than just the txtfmt plugin. For example,
>> the *...* and |...| pairs surrounding tags in a help file will be
>> visible as well.
>
> I'd stop short of calling this a bug, though.  My colorscheme of
> choice sets Ignore to something visible-but-light, and I rather like
> it that way - let's me see the "hidden" things if I look closely,
> without getting in my way.
>
> ~Matt

Yeah, the default highlights include ctermfg=bg guifg=bg for Ignore; any
custom colorscheme may set fg and bg to whatever it wants for any
highlight group including Ignore -- setting it to "slightly visible" is
a definite possibility. As always, if you don't like what one
colorscheme sets, use another or write your own.

Best regards,
Tony.
--
What garlic is to food, insanity is to art.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Tony Mechelynck
In reply to this post by Stahlman Family

On 13/02/09 13:43, Stahlman Family wrote:

>
>
> pansz wrote:
>> R Sam 写道:
>>> To whoever maintains the "desert" colorscheme distributed with vim:
>>>
>>> It turned out to be an issue with the Ignore group's highlight setting. The
>>> desert colorscheme has its background set as guibg=grey20, while its Ignore
>>> group highlight has its guifg=grey40. I manually set it as guifg=bg in my
>>> .vimrc and the ignore works fine now. The txtfmt scripts hidden tokens now
>>> stay hidden.
>> This is not a bug, it is a "feature" IMO, I learned from desert scheme
>> and use this feature in my own color scheme.
>
>    From the Vim help...
> To be able to allow each user to pick his favorite set of colors, there
> must be preferred names for highlight groups that are common for many
> languages. These are the suggested group names (if syntax highlighting
> works properly you can see the actual color, except for "Ignore"):
> .
> .
> *Ignore left blank, hidden
>
> Note in particular the `...can see the actual color, except for
> "Ignore"' and 'hidden'. Whether we call it a bug or not, it is
> definitely a departure from the Vim default for the Ignore group, which
> sets guifg=bg. While I understand the rationale you've presented, I
> guess my view is that colorschemes should change the colors themselves,
> but not the "meaning" of the default group. The Ignore group, to me,
> implies ignorance of something's existence: i.e., the invisibility of
> the thing being ignored. One of the  classic uses of Ignore is to hide
> characters `*' and `|' when they surround tags in a helpfile. Is there
> really any reason to see such things at all? The idea is to make it
> appear that the help keywords are "magically" highlighted. Of course, if
> you don't like such magic, you can always (well, perhaps not always, as
> you point out) put your cursor on the character and see it, since the
> cursor is usually a different color from foreground and background.

In fact, I personally _like_ to see the |bars| and *stars* of help tags,
the way Vim 6 did it; that's why my personal colorscheme doesn't link
helpBar and helpStar to Ignore but to helpHyperTextJump and
helpHyperTextEntry respectively.

Since the cursor is only one character cell in size, to "see what is
there" by the above means, you have to first know that there is (or
think that there might be) some hidden character at that exact position,
and then point your Normal-mode cursor to every such position in turn
(well, to each one of those you wanted to "read"). Defining Ignore with
fg slightly different from bg allows the user to see the whole "disabled
text" at a glance.

>
> At any rate, I'll look at putting a workaround in txtfmt: i.e.,
> something that will not rely upon the Ignore group to hide things...
>
> Thanks,
> Brett S.

Linking some newly-created highlight group to Ignore makes sure the
"default" highlights will make it invisible; a "custom" colorscheme can
(and may) depart from the default at any point, including reveal what is
normally hidden. I would "expect" a colorscheme to set Ignore to bg
identical to Normal bg, and fg either identical to bg or very close to
it; but if someone wanted to write a colorscheme displaying Ignore as
bold yellow on black and use that, the more freedom to him! I certainly
wouldn't use that kind of colorscheme but that's just my choice. The
same applies to anything your txtfmt plugin "hides" by means of a
highlight group, either Ignore directly or something linked to it.


Best regards,
Tony.
--
Hacker's Law:
        The belief that enhanced understanding will necessarily stir a
nation to action is one of mankind's oldest illusions.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

panshizhu
In reply to this post by Tony Mechelynck

Tony Mechelynck 写道:
> setting it to "slightly visible" is
> a definite possibility. As always, if you don't like what one
> colorscheme sets, use another or write your own.
>
I think change only one line in the colorscheme is much easier than use
another or write your own.

If that is the only thing you don't like, why bother write the whole
thing from scratch? simply change the source code.

IMO slightly visible is the best approach we can do for Ignore.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Tony Mechelynck

On 14/02/09 04:32, pansz wrote:
> Tony Mechelynck 写道:
>> setting it to "slightly visible" is
>> a definite possibility. As always, if you don't like what one
>> colorscheme sets, use another or write your own.
>>
> I think change only one line in the colorscheme is much easier than use
> another or write your own.

Actually, /stricto sensu/ it does qualify as either "use another" (since
the one you use is different from the one you didn't like) or "write
your own" (since your own changes are in it and therefore you shouldn't
leave the modified colorscheme in $VIMRUNTIME/colors/ -- where any
upgrade may silently overwrite it -- but move it to
$VIM/vimfiles/colors/, ~/.vim/colors/ or ~/vimfiles/colors/ depending on
whether you want it to be system-wide or single-user, and for the
latter, whether you aren't or are running on Windows).

>
> If that is the only thing you don't like, why bother write the whole
> thing from scratch? simply change the source code.

By "write your own" I didn't necessarily mean "from scratch" -- anything
already present may be used as a guide or a source of inspiration. Also,
never, NEVER modify ANYTHING in-place in the $VIMRUNTIME directory tree:
any upgrade may silently modify it (removing your changes without
telling you) and sooner or later one will.

>
> IMO slightly visible is the best approach we can do for Ignore.

Best regards,
Tony.
--
Disclaimer: Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental.  Any resemblance between the above and my own views is
non-deterministic.  The question of the existence of views in the
absence of anyone to hold them is left as an exercise for the reader.
The question of the existence of the reader is left as an exercise for
the second god coefficient.  (A discussion of non-orthogonal,
non-integral polytheism is beyond the scope of this article.)

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Stahlman Family
In reply to this post by Matt Wozniski-2



On Feb 13, 1:24 pm, Matt Wozniski <[hidden email]> wrote:
> On Fri, Feb 13, 2009 at 7:43 AM, Stahlman Family wrote:
> > One of the  classic uses of Ignore is to hide
> > characters `*' and `|' when they surround tags in a helpfile. Is there
> > really any reason to see such things at all?
>
> Learning how to write helpfiles, for one - a lot of the constructs
> aren't documented, short of looking at a help file yourself, or
> looking at syntax/help.vim.

Hmmm. I suppose. (Although that sounds a bit to me like having a
browser display the "<a href=..." as an aid to those learning html ;-)
Seriously, I didn't mean to cause a stir. I simply viewed these
characters as markup tags, and didn't realize there were so many who
wished to see them. I will implement a workaround...

>
> > At any rate, I'll look at putting a workaround in txtfmt: i.e.,
> > something that will not rely upon the Ignore group to hide things...
>
> Easy enough, just adding a highlight group that you know is invisible.

Easy enough for the gui, but perhaps not so easy for cterm, since Vim
doesn't always know what the background color is in a color terminal.
In my xterm, for instance, "ctermfg=bg" generates "E420: BG color
unknown". Perhaps there's a way to obtain the background color in a
cterm programmatically. I'll have to look into it...

Brett Stahlman

>
> ~Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Matt Wozniski-2

On Fri, Feb 13, 2009 at 11:46 PM, Brett Stahlman wrote:

> On Feb 13, 1:24 pm, Matt Wozniski <[hidden email]> wrote:
>> On Fri, Feb 13, 2009 at 7:43 AM, Stahlman Family wrote:
>> > One of the  classic uses of Ignore is to hide
>> > characters `*' and `|' when they surround tags in a helpfile. Is there
>> > really any reason to see such things at all?
>>
>> Learning how to write helpfiles, for one - a lot of the constructs
>> aren't documented, short of looking at a help file yourself, or
>> looking at syntax/help.vim.
>
> Hmmm. I suppose. (Although that sounds a bit to me like having a
> browser display the "<a href=..." as an aid to those learning html ;-)
> Seriously, I didn't mean to cause a stir. I simply viewed these
> characters as markup tags, and didn't realize there were so many who
> wished to see them. I will implement a workaround...

You mean you don't have your browser set up to do that!?  :-p  Point taken.

>> > At any rate, I'll look at putting a workaround in txtfmt: i.e.,
>> > something that will not rely upon the Ignore group to hide things...
>>
>> Easy enough, just adding a highlight group that you know is invisible.
>
> Easy enough for the gui, but perhaps not so easy for cterm, since Vim
> doesn't always know what the background color is in a color terminal.
> In my xterm, for instance, "ctermfg=bg" generates "E420: BG color
> unknown". Perhaps there's a way to obtain the background color in a
> cterm programmatically. I'll have to look into it...

Ech.  True.  There's no real way to do this that I can see...  It's
entirely possible for a terminal vim to set its Normal background
color to some color that isn't representable by any of the colors [ 0,
&t_Co ) - and, in that case, I don't know if there's anything you
could do (or the colorscheme) could do to make the foreground match
the background.  I'll keep thinking about it and see if I come up with
something...  The general way for an application to do this would be
sending CSI 8 m before the invisible character and CSI 28 m after,
telling the terminal "hide this text" instead of "change the color for
this text"...  But I know of no way to get vim to use that - and, even
if I did, it seems to cooperate with xterm and gnome-terminal, but not
with screen...

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Tony Mechelynck

On 14/02/09 08:47, Matt Wozniski wrote:

> On Fri, Feb 13, 2009 at 11:46 PM, Brett Stahlman wrote:
>> On Feb 13, 1:24 pm, Matt Wozniski<[hidden email]>  wrote:
>>> On Fri, Feb 13, 2009 at 7:43 AM, Stahlman Family wrote:
>>>> One of the  classic uses of Ignore is to hide
>>>> characters `*' and `|' when they surround tags in a helpfile. Is there
>>>> really any reason to see such things at all?
>>> Learning how to write helpfiles, for one - a lot of the constructs
>>> aren't documented, short of looking at a help file yourself, or
>>> looking at syntax/help.vim.
>> Hmmm. I suppose. (Although that sounds a bit to me like having a
>> browser display the "<a href=..." as an aid to those learning html ;-)
>> Seriously, I didn't mean to cause a stir. I simply viewed these
>> characters as markup tags, and didn't realize there were so many who
>> wished to see them. I will implement a workaround...
>
> You mean you don't have your browser set up to do that!?  :-p  Point taken.
>
>>>> At any rate, I'll look at putting a workaround in txtfmt: i.e.,
>>>> something that will not rely upon the Ignore group to hide things...
>>> Easy enough, just adding a highlight group that you know is invisible.
>> Easy enough for the gui, but perhaps not so easy for cterm, since Vim
>> doesn't always know what the background color is in a color terminal.
>> In my xterm, for instance, "ctermfg=bg" generates "E420: BG color
>> unknown". Perhaps there's a way to obtain the background color in a
>> cterm programmatically. I'll have to look into it...
>
> Ech.  True.  There's no real way to do this that I can see...  It's
> entirely possible for a terminal vim to set its Normal background
> color to some color that isn't representable by any of the colors [ 0,
> &t_Co ) - and, in that case, I don't know if there's anything you
> could do (or the colorscheme) could do to make the foreground match
> the background.  I'll keep thinking about it and see if I come up with
> something...  The general way for an application to do this would be
> sending CSI 8 m before the invisible character and CSI 28 m after,
> telling the terminal "hide this text" instead of "change the color for
> this text"...  But I know of no way to get vim to use that - and, even
> if I did, it seems to cooperate with xterm and gnome-terminal, but not
> with screen...
>
> ~Matt

$VIMRUNTIME/syntax/syncolor.vim defines the Ignore group as follows:

- If 'bacground' is set to "dark"
        term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg
guibg=NONE

- otherwise
        term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg
guibg=NONE

The result, in konsole where "ctermfg=bg" gives "E420: BG color
unknown", is that bg and fg get set to the same colour (which, in my
case, is a kind of pale yellow).


Best regards,
Tony.
--
Don't feed the bats tonight.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Matt Wozniski-2

On Sat, Feb 14, 2009 at 3:37 AM, Tony Mechelynck wrote:

>
> $VIMRUNTIME/syntax/syncolor.vim defines the Ignore group as follows:
>
> - If 'bacground' is set to "dark"
>        term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg
> guibg=NONE
>
> - otherwise
>        term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg
> guibg=NONE
>
> The result, in konsole where "ctermfg=bg" gives "E420: BG color
> unknown", is that bg and fg get set to the same colour (which, in my
> case, is a kind of pale yellow).

Hm.  Since it's "pale", I assume "background" is set to "light" - in
which case, the foreground should be white, and the background should
be whatever the default background for your terminal window is -
yellow-ish, I assume?

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Tony Mechelynck

On 14/02/09 09:52, Matt Wozniski wrote:

> On Sat, Feb 14, 2009 at 3:37 AM, Tony Mechelynck wrote:
>> $VIMRUNTIME/syntax/syncolor.vim defines the Ignore group as follows:
>>
>> - If 'bacground' is set to "dark"
>>         term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg
>> guibg=NONE
>>
>> - otherwise
>>         term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg
>> guibg=NONE
>>
>> The result, in konsole where "ctermfg=bg" gives "E420: BG color
>> unknown", is that bg and fg get set to the same colour (which, in my
>> case, is a kind of pale yellow).
>
> Hm.  Since it's "pale", I assume "background" is set to "light" - in
> which case, the foreground should be white, and the background should
> be whatever the default background for your terminal window is -
> yellow-ish, I assume?
>
> ~Matt

":hi Ignore" _says_ cterm colors are set to cterm=bold ctermfg=7 but
_actually_ it is not white foreground but pale yellow, just like the
background. I guess that's the solution for setting invisible highlights
in cterm -- I've altered my colorscheme to

        :exe "hi Ignore term=NONE guibg=white guifg=#999999 ctermfg="
          \ . (&bg == "dark" ? "black" : "white")

and it works, even in terminals with a "light but non-white" background.


Best regards,
Tony.
--
Johnson's First Law:
        When any mechanical contrivance fails, it will do so at the
most inconvenient possible time.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Stahlman Family



On Feb 14, 3:33 am, Tony Mechelynck <[hidden email]>
wrote:

> On 14/02/09 09:52, Matt Wozniski wrote:
>
>
>
>
>
> > On Sat, Feb 14, 2009 at 3:37 AM, Tony Mechelynck wrote:
> >> $VIMRUNTIME/syntax/syncolor.vim defines the Ignore group as follows:
>
> >> - If 'bacground' is set to "dark"
> >>         term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg
> >> guibg=NONE
>
> >> - otherwise
> >>         term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg
> >> guibg=NONE
>
> >> The result, in konsole where "ctermfg=bg" gives "E420: BG color
> >> unknown", is that bg and fg get set to the same colour (which, in my
> >> case, is a kind of pale yellow).
>
> > Hm.  Since it's "pale", I assume "background" is set to "light" - in
> > which case, the foreground should be white, and the background should
> > be whatever the default background for your terminal window is -
> > yellow-ish, I assume?
>
> > ~Matt
>
> ":hi Ignore" _says_ cterm colors are set to cterm=bold ctermfg=7 but
> _actually_ it is not white foreground but pale yellow, just like the
> background. I guess that's the solution for setting invisible highlights
> in cterm -- I've altered my colorscheme to
>
>         :exe "hi Ignore term=NONE guibg=white guifg=#999999 ctermfg="
>           \ . (&bg == "dark" ? "black" : "white")
>
> and it works, even in terminals with a "light but non-white" background.

It doesn't seem to work in the evening colorscheme, which has a rather
dark grey background, but for which bg == light. I wonder whether the
"pale yellow" you see in your konsole is simply that console's version
of white? In my xterm, most of the "light" colorschemes I tried had
the same "whitish" background. For the ones with more grey
backgrounds, the solution above shows the ignored text in white. It's
rather obvious for the evening colorscheme, since the background is
such a dark grey; it's less obvious for a colorscheme such as morning,
whose background is a much lighter grey.

Note that both evening and morning colorschemes hide Ignore characters
completely with the following settings...
evening:
    Ignore ctermfg=242
morning:
    Ignore ctermfg=7
...which set ctermfg to the same number used for ctermbg in the Normal
group. I suppose I can use the brute-force approach: i.e., parse the
output of ":hi Normal" and extract the ctermfg value...

Thanks,
Brett Stahlman

>
> Best regards,
> Tony.
> --
> Johnson's First Law:
>         When any mechanical contrivance fails, it will do so at the
> most inconvenient possible time.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Stahlman Family



On Feb 14, 8:00 am, Brett Stahlman <[hidden email]> wrote:

> On Feb 14, 3:33 am, Tony Mechelynck <[hidden email]>
> wrote:
>
>
>
>
>
> > On 14/02/09 09:52, Matt Wozniski wrote:
>
> > > On Sat, Feb 14, 2009 at 3:37 AM, Tony Mechelynck wrote:
> > >> $VIMRUNTIME/syntax/syncolor.vim defines the Ignore group as follows:
>
> > >> - If 'bacground' is set to "dark"
> > >>         term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg
> > >> guibg=NONE
>
> > >> - otherwise
> > >>         term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg
> > >> guibg=NONE
>
> > >> The result, in konsole where "ctermfg=bg" gives "E420: BG color
> > >> unknown", is that bg and fg get set to the same colour (which, in my
> > >> case, is a kind of pale yellow).
>
> > > Hm.  Since it's "pale", I assume "background" is set to "light" - in
> > > which case, the foreground should be white, and the background should
> > > be whatever the default background for your terminal window is -
> > > yellow-ish, I assume?
>
> > > ~Matt
>
> > ":hi Ignore" _says_ cterm colors are set to cterm=bold ctermfg=7 but
> > _actually_ it is not white foreground but pale yellow, just like the
> > background. I guess that's the solution for setting invisible highlights
> > in cterm -- I've altered my colorscheme to
>
> >         :exe "hi Ignore term=NONE guibg=white guifg=#999999 ctermfg="
> >           \ . (&bg == "dark" ? "black" : "white")
>
> > and it works, even in terminals with a "light but non-white" background.
>
> It doesn't seem to work in the evening colorscheme, which has a rather
> dark grey background, but for which bg == light. I wonder whether the
> "pale yellow" you see in your konsole is simply that console's version
> of white? In my xterm, most of the "light" colorschemes I tried had
> the same "whitish" background. For the ones with more grey
> backgrounds, the solution above shows the ignored text in white. It's
> rather obvious for the evening colorscheme, since the background is
> such a dark grey; it's less obvious for a colorscheme such as morning,
> whose background is a much lighter grey.
>
> Note that both evening and morning colorschemes hide Ignore characters
> completely with the following settings...
> evening:
>     Ignore ctermfg=242
> morning:
>     Ignore ctermfg=7
> ...which set ctermfg to the same number used for ctermbg in the Normal
> group. I suppose I can use the brute-force approach: i.e., parse the
> output of ":hi Normal" and extract the ctermfg value...

On second thought, that won't work. The output of ":hi Normal" in the
desert colorscheme is...
Normal    xxx    cleared
...which isn't very helpful. I did a quick test with synIDattr(), and
got a -1, which isn't very helpful either. Hmmm...

Brett Stahlman

>
> Thanks,
> Brett Stahlman
>
>
>
>
>
> > Best regards,
> > Tony.
> > --
> > Johnson's First Law:
> >         When any mechanical contrivance fails, it will do so at the
> > most inconvenient possible time.- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Matt Wozniski-2
In reply to this post by Stahlman Family

On Sat, Feb 14, 2009 at 9:00 AM, Brett Stahlman wrote:

>
> Note that both evening and morning colorschemes hide Ignore characters
> completely with the following settings...
> evening:
>    Ignore ctermfg=242
> morning:
>    Ignore ctermfg=7
> ...which set ctermfg to the same number used for ctermbg in the Normal
> group. I suppose I can use the brute-force approach: i.e., parse the
> output of ":hi Normal" and extract the ctermfg value...

Like I said, that isn't enough.  Most terminals (Konsole being the
only exception I know of) only allow you to set the foreground or
background color for some text to one of, at most, 256 specific
colors.  They allow you to set the *default* foreground or background
color to one of 16777216 colors.  So, the odds are against the user's
choice of background color even being able to be set with a
ctermbg=[0-255].

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Tony Mechelynck
In reply to this post by Stahlman Family

On 14/02/09 15:00, Brett Stahlman wrote:
> [...] I wonder whether the
> "pale yellow" you see in your konsole is simply that console's version
> of white?  [...]

No, it's its one of its "schemas" (which is the konsole name for theme,
skin, colorscheme, etc.), named "Black on Light Yellow". Maybe it
_obtains_ that by changing element #0 of its colour palette, but it can
use different "schemas" with different fg/bg colours.

Best regards,
Tony.
--
Men may not be seen publicly in any kind of strapless gown.
                [real standing law in Florida, United States of America]

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: desert colorscheme's "Ignore" highlight has wrong guifg setting...

Stahlman Family
In reply to this post by Matt Wozniski-2



Matt Wozniski wrote:

> On Sat, Feb 14, 2009 at 9:00 AM, Brett Stahlman wrote:
>> Note that both evening and morning colorschemes hide Ignore characters
>> completely with the following settings...
>> evening:
>>    Ignore ctermfg=242
>> morning:
>>    Ignore ctermfg=7
>> ...which set ctermfg to the same number used for ctermbg in the Normal
>> group. I suppose I can use the brute-force approach: i.e., parse the
>> output of ":hi Normal" and extract the ctermfg value...
>
> Like I said, that isn't enough.  Most terminals (Konsole being the
> only exception I know of) only allow you to set the foreground or
> background color for some text to one of, at most, 256 specific
> colors.  They allow you to set the *default* foreground or background
> color to one of 16777216 colors.  So, the odds are against the user's
> choice of background color even being able to be set with a
> ctermbg=[0-255].

I'm not sure I understand the distinction between a terminal's "default"
background, and the background colors to which text can be set. Are you
saying that the terminal could have a certain background color where no
text appears, but that a program such as vim wouldn't be able to output
text with that color to the terminal?

Thanks,
Brett Stahlman
>
> ~Matt
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

12