Great idea. I could see how this could be a nice feature to add to some of my projects, so I did a little research and here is what I came up with:
The relevant reading in vim...
:help syntax
:help 2html
From the command line...
vim -f +"syn on" +"so \$VIMRUNTIME/syntax/2html.vim" +"wq" +"q" yourfi
+le.pl
This will create yourfile.html in the current directory. I had to tweak the resulting HTML to change the background from white to black. (Perhaps since that is what my terminal background color is, that is the colors that vim used.) I would be very interested to know if you come up with any improvements on this method.
-Nathan