A milestone in my question answering career: this is the first time I solved something with nothing but a pure, unadulterated, grade-A SWAG. I don't know how much value this will have for anyone but the OP but an answer is an answer. Forgive the padding. ;)
I didn't seen anything wrong with the sample code in the question. These are both perfectly valid assignments of a string to a variable:
Based on the mention of using a shortcut, I thought maybe there was some question about whether this would also work in an indirect context such as a mapping. No problem there; it can be dropped right in like this, for instance...
:nnoremap X :let ayucolor = 'dark'<CR>
- The idea is to alter some characteristic of a color scheme via a variable (setting).
- "It doesn't work" probably means "nothing happens" since any errors/warnings that appeared would surely be noted in the question.
- A color scheme is a pretty static thing so if the setting in question is initialized in the color scheme file itself we're probably out of luck as far as being able to change things live/on-the-fly.
- There must be a default that gets used only if a value is not specified before the
The color scheme will need to be reloaded after you initialize/change the
And the crowd goes wild!