Are there any tools to convert a pygments style definition into a gvim colorscheme?
I found vim2pygments, which converts vim colorschemes to pygments themes, but I haven't found anything doing the inverse. Specifically, I'm using macvim, though I imagine the colorscheme format would be the same for any gvim-derivative (please, correct me if I'm wrong).
I haven't come across anything that will automate this process, but it should be very easy to do by hand. Grab an existing colour scheme, stick it in your
~/.vim/colors/
directory and put the colours that are defined in the pygments scheme into the appropriate places.For example, if you use my colour scheme (which uses a non-standard format to make it more editable) and make it uses the pygments autumn scheme, you could take the line that looks like this:
and change it to look like this:
(I've removed the colour terminal assignment as you've said you're using a GUI and it is thus largely irrelevant).
It shouldn't take very long to go through the whole set. My colour scheme is designed for dark backgrounds primarily (it adjusts colours if you switch to a light background), but it wouldn't be very hard to get rid of this aspect: change the "Normal" highlighting to be black on white rather than white on black and remove the
s:MakeDarker
function and the bit in theif &background == 'light'
block.Alternatively, you could do a similar thing with the normal syntax highlighting format by taking (e.g.) darkblue.vim and changing (e.g.):
and changing it to: