简体   繁体   English

当没有.vimrc时,Vim 8.0状态行背景变色

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

I have been using a Vim configuration with own status line design. 我一直在使用具有自己状态线设计的Vim配置。 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. 我在自定义vimrc文件中进行配置,然后从/ usr / share / vim / vimrc进行符号链接,因此配置是系统范围的。 Under some accounts I have also user specific configuration in ~/.vimrc and other configuration files. 在某些帐户下,我在〜/ .vimrc和其他配置文件中也有用户特定的配置。

Recently, I updated my distribution and got a fresh Vim 8.0 along with it. 最近,我更新了我的发行版并获得了一个新的Vim 8.0。 Something has changed. 事情发生了变化。 I do not know if in Vim 8 internally or the change is distribution specific. 我不知道内部是否在Vim 8中或者更改是特定于分发的。 I have experienced this on two different flavors of Ubuntu 17.04. 我在两种不同版本的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. 它存在〜/ .vimrc文件。 It could be empty, "touch .vimrc" pretty does the trick. 它可能是空的,“触摸.vimrc”非常有用。

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. 也许〜/ .vimrc的存在会阻止某些其他系统范围的配置(除了/ usr / share / vim / vimrc)加载并且存在一些冲突的代码。并且可能是由完全不同的东西引起的。

Any ideas what I should look on? 任何想法我应该看什么?

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. vim8引入了一个新概念,旨在帮助新用户,但却对现有用户和不了解它的系统管理员造成了很多困惑。 If, as you've noticed, you have no .vimrc, then "defaults.vim" is loaded. 如果你已经注意到,你没有.vimrc,那么加载“defaults.vim”。

See :help defaults 请参阅:help defaults

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM