Open neur1n opened 5 years ago
Gruvbox itself can't provide that flag, because (as you mentioned) gruvbox isn't loaded/installed so there is no way it could set any flags.
In the other hand, there are some workarounds.
You could make the colorscheme gruvbox
silent so there wouldn't be any errors if it couldn't be loaded like so silent! colorscheme gruvbox
.
For a default color scheme, you need to add it BEFORE gruvbox.
For example, if you want desert
to be your default color scheme add these lines to your vimrc:
silent! colorscheme desert
silent! colorscheme gruvbox
Forum post can be found here.
Also, notice that this approach may not work for airline/lightline if you are using them.
Hello, I have the problem that if I deploy my
vimrc
in a new environment, an error occurs if gruvbox is not installed since I use vim-plug to install it afterwards. So can it provide a flag that indicating if gruvbox is loaded, so that I can make it fall back to a builtin colorscheme.Or, is there a workaround? Thanks.