Since OS X Lion the terminal.app is xterm-256color terminal. However vim is rendering only 8 colors. I tried the 7.3 supplied with Lion and 7.3 that is terminal version of MacVim.

Vim Wiki sais I need to set configure option --enable-256-color (before compiling), but I get configure: WARNING: unrecognized options: --enable-256-color.

So how can I get 256 colors in terminal eventually?

UPD: I tested color schemes: desert, dante, ir_black - and have only 8 or 16 colors.

I also have set t_Co=256 in my .vimrc

link|improve this question

20% accept rate
1  
What's the color scheme you're using? Does it have support for 256 colors? – sidyll Sep 20 '11 at 23:24
I think changing $TERM may solve your problem. Go to Preferences -> Settings -> Advanced and set "Declare terminal as" to something like xterm-color or xterm-256color. Also try other 256 colorschemes like Mustang. – tungd Sep 21 '11 at 11:05
@tungd, it should be set to xterm-256color (especially not xterm-color). Virtually anything else will tell applications that the terminal doesn't support 256 colors. Halst seems to be indicating that it's already set to xterm-256color, which is the default on Lion. – Chris Page Sep 22 '11 at 4:19
feedback

migrated from stackoverflow.com Sep 21 '11 at 18:32

This question came from our site for professional and enthusiast programmers.

2 Answers

It is unnecessary for you to build Vim. The version of Vim installed with Mac OS X Lion 10.7 includes support for 256 colors. You simply need to install (and select) a color scheme that makes use of the extended color palette, e.g., desert256.

link|improve this answer
I was having the same issue with ir_back, installing tir_black solved the issue, some keywords are colored slightly different than in macvim but it's allright. – Macario Feb 19 at 6:59
feedback

Try adding:

set t_Co=256

to your .vimrc to force the usage of 256 colors

link|improve this answer
+1, but only if this actually works :) – Jed Daniels Sep 21 '11 at 0:57
No, that's unnecessary. The answer is you need a 256-color color scheme that actually uses the extra colors. – Chris Page Sep 21 '11 at 8:19
he has already set t_Co=256 – Macario Feb 19 at 6:50
feedback

Your Answer

 
or
required, but never shown

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