Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble Getting Colorschemes in Vim with Iterm2

I can't get the vimbrant colorscheme (or any) to work in Vim with Iterm2. This is my .vimrc file:

syntax on
syntax enable
colorscheme vimbrant
set background=dark

I have Iterm set up to use xterm-256 like it says in the FAQ as well. Whenever I echo in Vim it says 256.

The terminal also doesn't use the color settings I have in Iterm2 but I don't care about that as much.

EDIT: The file is in ~/.vim/colors/vimbrant.vim. Also, I forgot to mention that my cursor seems to have the right colors for variables and structs and whatnot, but the text itself is all white still. The background seems to be the correct color. And the only thing in my .gvimrc file is colorscheme vimbrant.

like image 587
clee101 Avatar asked Jan 23 '15 03:01

clee101


2 Answers

Really dumb mistake, I had minimum contrast maxed out without realizing.

like image 141
clee101 Avatar answered Nov 18 '22 02:11

clee101


I've been having the same issue and this is what seems to have solved it:

In your .bash_profile set CLICOLOR before setting TERM:

# Set CLICOLOR if you want Ansi Colors in iTerm2 
export CLICOLOR=1

# Set colors to match iTerm2 Terminal Colors
export TERM=xterm-256color

save bash file and source:

source ~/.bash_profile 

Then, in your iTerm2 Preferences > Terminal > Report Terminal Type, set to either xterm-256color or xterm

Close iTerm2, restart it and type ls. That did the trick for me.

Good luck.

like image 34
Leo Gasparrini Avatar answered Nov 18 '22 04:11

Leo Gasparrini