I want to generate HTML files in batch to show some gvim colorschemes in action. I took my current solution from the script at http://code.google.com/p/vimcolorschemetest/, but this will open open a gvim window for each colorscheme I want to process.

So far, the only way I have found to avoid the annoying new windows that pop up every second is to start a VNCserver and set the DISPLAY environment variable to that of the VNCserver so that all gvim windows are sent to the display within the VNC session.

However, I would like to know if there is a way I can avoid the whole VNC setup and just run a headless gvim instance that does the conversion and exits, with no windows ever being actually displayed.

I'm using linux, BTW.

link|improve this question

75% accept rate
feedback

1 Answer

I can't really tell whether your problem is that Vim opens too many windows at once, or that it opens any windows at all...

The latter case I can't help you with, however, in any newer Vim, you can do something like this (very primitive, can probably be made a lot nicer):

# gvim -c TOhtml -c w -c q -c q test.c

which will create a test.c.xhtml based on the file test.c using the current color scheme. Then, perhaps another -c to change the colors, stick it all in a shell script...

EDIT:

with no windows ever being actually displayed.

Yeah, so, I'm a moron. Please disregard this post.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.