base16-vim-lightline
base16-vim-lightline copied to clipboard
Generated Lightline colorscheme names differ from `base16-vim` names due to conversion of hyphens to underscores
Right now, it is not possible to set g:lightline['colorscheme']
directly to the value of g:colors_name
, because the Mustache template substitutes hyphen characters with underscores in the name of generated files:
https://github.com/mike-hearn/base16-vim-lightline/blob/cea11b7d0a407eccf0085feefb5e3be2ec99bdbb/templates/default.mustache#L41
(in the postbuild script as well)
base16-vim does not perform such conversion, which result in different names between the two projects: https://github.com/fnune/base16-vim/blob/dd770de2790ef42f260a79878f1dee131d2e3d7d/templates/default.mustache#L148
I was wondering whether this was intentional, since this conversion requires another substitution in order to be able to automatically set the Lightline colorsheme to the current Vim colorscheme, which might be avoidable.
Example:
let g:lightline = {
\ 'colorscheme': substitute(g:colors_name, '-', '_', 'g')
\ }