1

I'm trying to use base16-vim for a light color scheme. I want to use "one-light", but it seems that none of the light schemes work. After starting Vim with a light scheme, :colo reports default scheme. When I do the same after switching to a dark scheme, the correct one is reported.

I debugged the startup with vim -D and can see, that the correct light scheme is set in the beginning, but at the very end (I think it is caused by autocommands) it switches back to default. I also checked log files of both startups (light/dark schemes) with vim -V20debug.log and found that the main difference (besides the colors of course) is, the the light scheme is loaded again at the end.

I already debugged Vim a lot, but do not know how to proceed. When I debug vim with vim -D for two different colorschemes (light/dark) I get this output (:colo is added by me to check current colorscheme):

light scheme:

Befehl: call s:LocalBrowse(expand("<amatch>"))
>colo
base16-one-light
Befehl: call s:VimEnter(expand("<amatch>"))
>colo
default

dark scheme:

Befehl: call s:LocalBrowse(expand("<amatch>"))
>colo
base16-onedark
Befehl: call s:VimEnter(expand("<amatch>"))
>colo
base16-onedark
4
  • 1
    Welcome to Vi&Vim SE. I recall a number of questions asked in the past related to base16 color schemes. Have you searched this site for those already? "base16" alone as a search term will probably be sufficient.
    – B Layer
    Commented Mar 12, 2021 at 19:49
  • Perhaps How to debug my vimrc?
    – D. Ben Knoble
    Commented Mar 12, 2021 at 21:17
  • Yes, I reviewed the base16 topics, but I think my issue is not discussed up to now.
    – Oliver
    Commented Mar 13, 2021 at 6:10
  • Okay. One other question...don't take offense if this seems obvious to you as I helped someone with a base16 scheme problem with this very same recommendation: Are there installation instructions on whatever the scheme's home page is and, if so, did you follow them? (Many schemes just can be thrown in colors dir but some need special handling.)
    – B Layer
    Commented Mar 13, 2021 at 7:54

2 Answers 2

1

I have to set

set bg=dark

I found this here

The recommendation for

colorscheme base16-default-dark

is probably wrong or not working in my setup.

Maybe there's a difference if you have you config in ~/.vimrc compared to .vim/vimrc? I have mine in the second folder.

1

I had a similar issue with getting the gruvbox colourscheme loaded on a remote installation.

This is definitely a hack, but I solved it by adding:

execute "colorscheme gruvbox"

to my .vimrc, which solved the issue.

2
  • That... doesn’t make any sense? I’m surprised it worked for whatever your situation was; there shouldn’t be any difference between :execute "colorscheme gruvbox" and :colorscheme gruvbox
    – D. Ben Knoble
    Commented Mar 15, 2021 at 14:34
  • I know right, my guess is that the execute command runs later or at a different priority. I found the suggestion somewhere and it worked. I didn't have the issue on my local install so I never delved into the how and why it works or what was wrong.
    – ljden
    Commented Mar 15, 2021 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.