Closed neutaaaaan closed 3 years ago
Should we mark includes with some prefix? Like _tcozero
?
Also what would happen if you press BuildAll!
button? Would colortemplate try to also build a tcozero
colorscheme?
I have no idea, I don't use the colortemplate
ui and I never tried building that file by itself.
The prefix sounds like a good idea, that's already how Lifepillar handled includes.
There is a way to build all colortemplates with a command, and I believe it will try to also build that include. AFAIR, @lifepillar doesn't use .colortemplate
for includes.
yes, indeed: ColortemplateAll!
:
Include: _tcozero
works actually for t_Co=0
. Not sure why though.
@neutaaaaan could you rename it to _tcozero
(without .colortemplate
extension)?
@lifepillar, could you explain how colortemplate handles t_Co=0
?
@habamax https://github.com/lifepillar/vim-colortemplate/blob/master/doc/colortemplate.txt#L300 so it doesn't appear to be handled to me.
@lifepillar, could you explain how colortemplate handles t_Co=0?
At the beginning of each color scheme, you may find this line:
let s:t_Co = exists('&t_Co') && !empty(&t_Co) && &t_Co > 1 ? &t_Co : 2
So, whenever t_Co
is non-existing, undefined, or its value is less than 2, what is defined as Variant: 2
in the template will be used.
Also what would happen if you press BuildAll! button? Would colortemplate try to also build a tcozero colorscheme?
By convention, names starting with an underscore are considered included templates, and are not built directly by Colortemplate[All]
. The .colortemplate
suffix is optional.
So, whenever t_Co is non-existing, undefined, or its value is less than 2, what is defined as Variant: 2 in the template will be used.
Aha, that was my observation too for Variant: 2
, thx for confirming it!
Please note that the current Colortemplate's master now generates code using cterm
attributes for Variant: 2
. You should now use Variant: 0
(preferred) or Variant: 1
for b/w color schemes such as this.
Thank you!
I have only added it to desert, will change it tomorrow.
You should rebuild all color schemes, because this line:
let s:t_Co = exists('&t_Co') && !empty(&t_Co) && &t_Co > 1 ? &t_Co : 2
is now replaced by
let s:t_Co = exists('&t_Co') && !empty(&t_Co) && &t_Co > 1 ? &t_Co : 1
Note the last 1 instead of 2.
You should rebuild all color schemes, because this line:
We will rebuild them gradually anyway when _tcozero
include would be added. For now I have added it only to desert
.
As requested in irc, the include template for clutter-free t_Co=0 fallback, as used in
monochrome
.Not much more to say about it.