How should t_Co be being set?

0

I am on OS X 10.6.2 and am using iTerm as my terminal. When I run Vim, t_Co gets set to 8. I want it to be 16 or 256 if I can display that many colors. If I manually set t_Co to be 16 (i.e. :se t_Co=16 or set t_Co=16 in .vimrc) everything works fine.

Why doesn't t_Co get set to the highest available number? Is there some option I should be setting in iTerm or some environment variable I should be setting to make termcap pass the right information to vim? Is it safe to just override t_Co in my .vimrc?

Chas. Owens

Posted 2010-07-12T16:59:06.743

Reputation: 1 842

Answers

0

Going into Bookmarks->Manage Bookmarks..., expanding Terminal Profiles, choosing Default, and setting Type to be xterm-256color in the drop-down listbox causes t_Co to be 256.

Chas. Owens

Posted 2010-07-12T16:59:06.743

Reputation: 1 842

0

iTerm 2 makes this a lot easier to do, and is actively supported. I recommend trying http://code.google.com/p/iterm2

George

Posted 2010-07-12T16:59:06.743

Reputation: 1 496

Yeah, I switched over about a month ago. I need to take a look at the new release it is bugging me about. – Chas. Owens – 2010-12-03T02:49:03.037