I didn't put
color xxx in my
.vimrc. So I see this when I first open my
Then I type
:color darcula. And it changes to this.
Then I type
:set background=dark. And it changes to this.
So my question is, what exactly does
:set background=dark do?
:h background and didn't find anything helpful. I understand that this command doesn't actually change the background, only vim will change colors accordingly. But I still want to ask this question. Because I'm really happy with the color after
:color darcula and
:set background=dark so I wonder how to write my own color scheme without having to put
set background=dark in my
I took advice from @statox and put
set background=dark at the last line of my
color darcula gives me the third screenshot. However when I put it at the first line,
color darcula gives me the second screenshot. Also
set bg=dark changes it to the third screenshot.
I assumed by putting it at the first line, I'm telling vim that this colorscheme is designed for a dark background. By putting it at the last line, on the contrast, I let vim assume that this colorscheme is designed for a light background and then make vim change some of it by itself (when it processes the last line).
If what I assume happened is true, my question is still unanswered. What exactly did vim change, when I use
set bg=dark AFTER it has loaded a light colorscheme?
My entire vim configuration is available at https://github.com/MichaelMa2014/.vim