3

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

3
  • 1
    What's the color scheme you're using? Does it have support for 256 colors?
    – sidyll
    Sep 20, 2011 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, 2011 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, 2011 at 4:19

3 Answers 3

4

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.

1
  • 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, 2012 at 6:59
2

Try adding:

set t_Co=256

to your .vimrc to force the usage of 256 colors

3
  • 1
    +1, but only if this actually works :) Sep 21, 2011 at 0:57
  • 1
    No, that's unnecessary. The answer is you need a 256-color color scheme that actually uses the extra colors.
    – Chris Page
    Sep 21, 2011 at 8:19
  • he has already set t_Co=256
    – Macario
    Feb 19, 2012 at 6:50
0
echo -e "syntax on" >> ~/.vimrc

I know this might sound total stupidity, however, being in that same situation right now, guessing what might have gone wrong (I do have iTerm, 256colors set etc.) the simplest thing helped. :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .