When the colour scheme is loaded, either theĬolour scheme sets colours appropriate to the new setting of 'background', or The new setting of 'background' If a colour scheme is currently loaded Vim reloads the default colours, using foreground colours deemed appropriate for So what actually happens when the 'background' option is changed is this: If no colour scheme is currently loaded However, if the color scheme sets 'background' itself the effect may The color scheme adjusts to the value of 'background' this will work. Setting 'background' will cause the color scheme to be reloaded. When a color scheme is loaded (the "g:colors_name" variable is set) But the colors used for syntax highlighting will not When 'background' is set Vim will adjust the default color groups for It is documented (although not particularly clearly) in :help 'background'. The basic mechanism by which :set background works is actually pretty simple, and My entire vim configuration is available at What exactly did vim change, when I use set bg=dark AFTER it has loaded a light colorscheme? If what I assume happened is true, my question is still unanswered. 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). I assumed by putting it at the first line, I'm telling vim that this colorscheme is designed for a dark background. Also set bg=dark changes it to the third screenshot. However when I put it at the first line, color darcula gives me the second screenshot. Then color darcula gives me the third screenshot. I took advice from and put set background=dark at the last line of my darcula.vim. 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 understand that this command doesn't actually change the background, only vim will change colors accordingly. I tried :h background and didn't find anything helpful. So my question is, what exactly does :set background=dark do? :color gives me default here (amazingly). :color gives me darcula here (naturally).
0 Comments
Leave a Reply. |