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 via email to