On 03/04/09 23:55, Taylor Venable wrote:
>
> On Fri, Apr 03, 2009 at 01:18:32PM -0400, Matt Wozniski wrote:
>> On Fri, Apr 3, 2009 at 7:56 AM, Taylor Venable wrote:
>>> On Thu, Apr 02, 2009 at 07:51:21PM -0700, Gary Johnson wrote:
>>>> On 2009-04-02, Taylor Venable wrote:
>>>>> I have an xterm compiled with 256 color support. ??In Vim 7.2.88 after
>>>>> it loads up I can do :set t_Co to find that 256 color support is being
>>>>> found correctly (TERM = xterm-color). ??However, I cannot figure out
>>>>> how to determine whether 256 colors are supported on startup, as the
>>>>> value of t_Co is 8 at the time my .vimrc is loaded.
>>>>>
>>>>> I've tried a few autocommands, such as VimEnter and TermChanged but
>>>>> the value of t_Co in both of them is still 8, rather than the 256 I
>>>>> expect. ??At what point does t_Co get set to reflect the capabilities
>>>>> of the terminal, and how can I detect it during startup?
>>>>
>>>> If you want Vim to know
>>>> that your terminal supports 256 colors, perhaps you should set TERM
>>>> to "xterm-256color".
>>>
>>> I should also note that I get exactly the same behaviour when I have
>>> TERM set to xterm-256color, that is that t_Co is 8 while loading
>>> .vimrc but 256 after it goes interactive (when I can check it with
>>> ':set t_Co').
>>
>> tput -Txterm-256color colors
>> TERM=xterm-256color vim --cmd 'echomsg&t_Co' --cmd q
>
> Both print 8.
>
> Another thing I don't understand, although this may be the wrong forum
> for this question, is why xterm-256color claims that it handles only 8
> colors. My termcap file breaks down to this:
>
> xterm-256color Co#256 tc=xterm-xfree86
> xterm-xfree86 tc=xterm-basic
> xterm-basic Co#8
>
> Shouldn't the Co#256 in xterm-256color override that in xterm-basic?
>
The difference could be a question of order: either Co#256 in
xterm-256color overrides Co#8 included as part of xterm-basic, or the
opposite; and swapping them could make the difference. I'm not a termcap
guru though: try it and see, and if it doesn't work you'll have to try
something else.
Oh, and BTW, is your Vim using +termcap or +terminfo? If you've got both
libraries installed on your system, and they're out of step, then I
guess you're in trouble.
Best regards,
Tony.
--
Aquadextrous, adj.:
Possessing the ability to turn the bathtub faucet on and off
with your toes.
-- Rich Hall, "Sniglets"
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---