Dave
Dave

Reputation: 128

Vim 8.0 status line background discoloration when no .vimrc is present

I have been using a Vim configuration with own status line design. The status line has a background color set. I have the configuration in a custom vimrc file which is then symlinked from /usr/share/vim/vimrc so the configuration is system wide. Under some accounts I have also user specific configuration in ~/.vimrc and other configuration files.

Recently, I updated my distribution and got a fresh Vim 8.0 along with it. Something has changed. I do not know if in Vim 8 internally or the change is distribution specific. I have experienced this on two different flavors of Ubuntu 17.04. Basically, everything defined in my system wide config works as before but the status line lost its background. I was looking into it a bit and I realized that under some accounts it still works fine. I narrowed it down and found what makes the difference. It is the presence of ~/.vimrc file. It could be empty, "touch .vimrc" pretty does the trick.

Maybe the presence of ~/.vimrc prevents some other system wide config (other than /usr/share/vim/vimrc) from loading and there is some conflicting code in. And maybe it is caused by something completely different.

Any ideas what I should look on?

Upvotes: 1

Views: 107

Answers (1)

nickspoon
nickspoon

Reputation: 1397

vim8 introduced a new concept, designed to help new users but causing lots of confusion for existing users and sysadmins who weren't aware of it. If, as you've noticed, you have no .vimrc, then "defaults.vim" is loaded.

See :help defaults

Upvotes: 3

Related Questions