问题
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?
回答1:
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
.
来源:https://stackoverflow.com/questions/26913996/vim-bold-highlighting-only-after-reload-solarized-color-scheme