60051RE: color scheme switcher
- Jul 5, 2005I uploaded a script a while ago to allow different filetypes/buffers to
have their own colorschemes. I have another one that sets a randomly
chosen color scheme from the available list. I'm sure it would be
pretty easy to read the entire list into a variable and rotate, though I
prefer the unpredictability of the randomizer myself. (The randomizer
uses Dr. Chip's Rndm plugin.)
You can easily get the list of color schemes via globpath or some such;
retrieve the current scheme name from a variable, find the one
immediately after it in the globbed list and set it, storing this new
scheme name in the variable. If you get to the every end (there is no
'next' scheme), just pick the first one.
> -----Original Message-----
> From: Steve Felt [mailto:steve@...]
> Sent: Tuesday, July 05, 2005 1:59 PM
> To: David Rennalls
> Cc: vim mailing list
> Subject: Re: color scheme switcher
> On Tue, 2005-07-05 at 11:25, David Rennalls wrote:
> > On 7/5/05, Steve Felt <steve@...> wrote:
> > > Could a button be mapped to rotate through installed
> color schemes?
> > > vim aware of the files in ~/.vim, ~/.vim/colors etc?
> > >
> > > If so, I guess it would be trivial (for someone more
> capable in vim
> > > scripting than I am) to create a function which changes the
> > > to the next colorscheme and wraps at the end?
> > >
> > > My-oh-my, this would be neeeato. As I'm learning
> scripting, I'd be
> > > thrilled with examples/suggestions that might help me to
> write this
> > > script... if it hasn't been written already.
> > >
> > > --
> > >
> > > -steve
> > It's not exactly what you had in mind, but this might interest you..
> > Colors Sampler Pack : [full update] All the color schemes on
> > vim.sf.net (now with organized menu)
> > http://www.vim.org/scripts/script.php?script_id=625
> > - David
> Actually, this pack of 140 color schemes is the impetus for
> my question!
> Steve Felt <steve@...>
- << Previous post in topic Next post in topic >>