in reply to Re: Using vim for highlighting in Perl
in thread Using vim for highlighting in Perl

To make the generated markup c?leaner, as well as much easier to recoulorize, set the html_use_css variable.
vim -f +'syntax on | let html_use_css = 1 | source $VIMRUNTIME/syntax/ +2html.vim | write | qall" foo.pl
Note that it produces the output in foo.pl.html, not foo.html. You could also replace the write with a saveas /tmp/foo to have the result always placed in /tmp/foo which may be more convenient for shell scripting.

Makeshifts last the longest.