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