Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer

iTerm 2 makes this a lot easier to do, and is actively supported. I recommend trying

share|improve this answer
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 Dec 3 '10 at 2:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.