问题描述
我在 $HOME
目录下有以下最小的 .vimrc
文件(我在 Ubuntu 14.04 LTS 上,使用 vim-gnome
):
语法设置背景=暗颜色方案日晒
除了那些应该是粗体的之外,一切都按预期突出显示.
默认情况下,solarized 配色方案应该加粗 error
s 和 todo
s.但是,它不会立即起作用.例如,打开一个文件并调用 :he group-name
,我得到以下信息:
你可以看到 error
和 todo
不是粗体的.如果我现在重新加载由 :colo solarized
曝光,突出显示最终会正确:
那么这里出了什么问题?我如何才能正常工作?
我找到了一个解决方法:
将 colo solarized
放在 /usr/share/vim/gvimrc
中解决了问题.
最初,我认为在 solarized.vim
和 gvimrc
之间加载的某些脚本可能与 solarized.vim
的粗体设置冲突.但似乎并非如此,因为我尝试将 colo solarized
放在它们之间的每个脚本中(基于 :script
的输出),但没有效果.>
奇怪的是,只有将 colo solarized
放在 /usr/share/vim/gvimrc
中才能正常工作.
I have the following minimal .vimrc
file under $HOME
directory (I'm on Ubuntu 14.04 LTS, using vim-gnome
):
syntax on
set background=dark
colorscheme solarized
And everything was highlighted as expected except for those supposed to be bold.
By default, solarized color scheme should bold error
s and todo
s. However it doesn't work right away. For example, opening a file and invoking :he group-name
, I get the following:
You can see error
and todo
are not bold. If I now reload solarized by :colo solarized
, the highlighting will finally get correct:
So what goes wrong here? how can I get solarized to work properly?
I have found an workaround:
Put colo solarized
in /usr/share/vim/gvimrc
solved the problem.
Initially, I thought some script loaded between solarized.vim
and gvimrc
might have conflicted with the bold setting of solarized.vim
. But It seems not the case, because I've tried putting colo solarized
in every script between them (based on output of :script
), which has no effect.
Strangely, It only works fine to put colo solarized
in /usr/share/vim/gvimrc
.
这篇关于Vim:仅在重新加载日光化配色方案后才突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!