manuelschipper
manuelschipper

Reputation: 137

Vim colorscheme not loading

My vim colorscheme does not work properly when I set it in my .vimrc yet if I load it inside of vim it will work. My .vimrc:

 syntax on

 colorscheme jellybeans
 set t_Co=256
 set background=dark

By default, the scheme loads with the colors of the terminal. Loading it from inside vim using

 :colorscheme jellybeans

overrides this.

Attempts to solve this

Upvotes: 0

Views: 1877

Answers (1)

Roland Smith
Roland Smith

Reputation: 43495

Look at this line in the color scheme:

if has("gui_running") || &t_Co == 88 || &t_Co == 256
  let s:low_color = 0
else
  let s:low_color = 1
endif

If t_Co is too low, it uses different colors.

Try setting t_Co before loading the color scheme.

Upvotes: 2

Related Questions