Created
November 21, 2011 03:28
-
-
Save ryanflorence/1381526 to your computer and use it in GitHub Desktop.
Random color scheme for vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function RandomColorScheme() | |
let mycolors = split(globpath(&rtp,"**/colors/*.vim"),"\n") | |
exe 'so ' . mycolors[localtime() % len(mycolors)] | |
unlet mycolors | |
endfunction | |
call RandomColorScheme() | |
:command NewColor call RandomColorScheme() |
This takes about 400ms on my machine which is too slow. I optimized this in vegerot/dotfiles@53e6b26 by simply changing "**/colors/*.vim
to colors/*.vim
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use random color from a list of your favorite colors do this (tested in neovide):