Dec 4 2008

Vim: Turn code into HTML

Maciej on his blog talks about an interesting feature in vim.

You can save highlighted source to a HTML file.
:runtime! syntax/2html.vim

So you can go from something like this:

Ruby Code in Vim

Ruby Code in Vim

To a html file like this:

Ruby Code in HTML

Ruby Code in HTML