vim-colorscheme-switcher
vim-colorscheme-switcher copied to clipboard
Randomly pick from caller-passed list.
Split out some of the #random()
functionality into a #random_among(choices)
function, to switch to a colorscheme from a caller-passed argument list.
In a perfect-world we'd have even better separation of concerns:
- random number generation (or better, have it built-in into Vim)
- graceful switching of colorschemes
- management of colorschemes: randomly pick from a list (from all schemes, from a shortlist, from a user-supplied list, etc.) according to some rules (excluding schemes from a blacklist, in a
background
-preserving manner, etc.)
This PR is not that ambitious however. Just having #random_among(choices)
makes it easier e.g. for me to implement vim-colorscheme-manager features, albeit at the cost of intertwining the two plugins.