vim / colorschemes

colorschemes for Vim
280 stars 23 forks source link

Colortemplate Variant: 0 #88

Closed habamax closed 2 years ago

habamax commented 2 years ago

We need a way to declare templates for 'no color' support aka Variant: 0.

See https://github.com/vim/colorschemes/pull/73

@lifepillar fyi

lifepillar commented 2 years ago

The current way is to use Variant: 2 (see my reply at https://github.com/vim/colorschemes/pull/73). Variant: 1 also works. For some reason, Variant: 0 gives an error. I'll look into it.

Perhaps, using Variant: 2 for “no color” was not the best idea. I will address that in Colortemplate v3.

habamax commented 2 years ago

So we can use either Variant: 1 or Variant: 2 for this.

lifepillar commented 2 years ago

I think that the value 2 is because when t_Co is less than or equal than two, Vim uses term highlighting instead of cterm. If this is inaccurate or you think this can be improved, feel free to open an issue in Colortemplate's repo.

romainl commented 2 years ago

I can definitely see colors with :let &t_Co = 2:

:let &t_Co = 2

They disappear with 1 and 0, though.

habamax commented 2 years ago

Variant: 2 works for t_Co=0, I have just double checked here with my colorschemes.

romainl commented 2 years ago

I opened an issue at colortemplate's: https://github.com/lifepillar/vim-colortemplate/issues/53

lifepillar commented 2 years ago

The current Colortemplate's master supports Variant: 0 for b/w (term attributes), while Variant: 2 now uses cterm attributes.