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').
Hm. That's... strange. What does tput -Txterm-256color colors print out at the shell? What does TERM=xterm-256color vim --cmd 'echomsg &t_Co' --cmd q print out? ~Matt --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
