ufotufo
ufotufo

Reputation: 95

Setting vim's background highlight color

I am trying to set up vim to behave consistently between my Yosemite installation and another Ubuntu 14 system that I have. The main problem I'm having is with background color highlighting. The desired look is below, from gnome-terminal on Ubuntu:

proper vim color highlighting

However, when I try to set up the same theme in OSX using iTerm (or terminal.app) I lose the highlighting as vim seems to match the color background to the highlighting background:

incorrect vim highlighting

Any idea of what I might be doing wrong or some commands I can use to probe how to modify the background color in Macvim so that there is consistency between both interfaces?

Upvotes: 2

Views: 802

Answers (1)

Cameron Moorehead
Cameron Moorehead

Reputation: 126

Add set t_Co=8 just before the line colorscheme solarized

Typically in Vim, people will have to set t_Co=256 to get rid of the background highlighting you're referring to. However, it seems that MacVim automatically assumes 256 colors, a result of the GUI.

Through set t_Co=8, you'll be overriding that default setting.

In theory anyways?

Upvotes: 1

Related Questions