You are not logged in.

#1 2015-07-03 22:03:03

lazork
Member
Registered: 2008-11-12
Posts: 30

[SOLVED] Vim default colorscheme changed after update

I recently updated vim from 7.4.729-1 to 7.4.764-1 and I noticed that the default color scheme has changed.
I can get the old one back by putting

color default

either in /etc/vimrc or in ~/.vimrc but I didn't need this before.
Is this intended behaviour?
Note that I also tried with a completely empty .vimrc and that my /etc/vimrc only contains the default

runtime! archlinux.vim

but I still get the odd colorscheme.
Downgrading the package also solves the issue, so this really is related to the package version.

Last edited by lazork (2015-07-04 10:47:10)

Offline

#2 2015-07-04 06:58:46

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] Vim default colorscheme changed after update

Check the background: is it set to dark or light? The default colorscheme looks very different when this setting is toggled. If the background is the problem, set the correction in your ~/.vimrc.

Command-line mode:

:colo default
:set bg
  background=light
:se bg=dark

Offline

#3 2015-07-04 10:46:56

lazork
Member
Registered: 2008-11-12
Posts: 30

Re: [SOLVED] Vim default colorscheme changed after update

You are right, this is related to the background color.
Turns out that the color scheme I'm used to is the one for light backgrounds (even though I'm actually using a black one).
The latest version of vim probably correctly detects the background color, which it wasn't doing before.
The reason why calling

:color default

resets the colorscheme to the one I'm used to, is beacuse the default color scheme (/usr/share/vim/vim74/colors/default.vim) contains

set bg&

which resets the background setting of vim to its default value (light).

For anyone else interested in this, note that

:set bg&

doesn't actually change the background, but simply tells vim to use colors that look good on a light background.

Thank you thisoldman, marking as solved.

Offline

Board footer

Powered by FluxBB