Vim is able to highlight syntax of a very large number of languages. It also has a nice feature, allowing you to save the highlighted source to a HTML file.
:runtime! syntax/2html.vim
After typing this command, you’ll get a split window with your source in HTML. You can now save it to a file.
2007-07-10 at 22:07 |
Vim is cool
2007-07-11 at 00:36 |
this sounds very intresting, and i’m going to have a go with it tomorrow.
2008-05-10 at 20:43 |
Perfect, thank you.
2008-11-20 at 12:43 |
Great, thanks! A programmer’s day without vim is just unconceivable
2008-12-02 at 11:45 |
[...] standard yet appreciable feature. So after some googling around I came across a solution posted by Maciej Bliziński which saves the syntax highlighted source code you would view inside vim as good old HTML. The [...]
2008-12-04 at 20:47 |
[...] on his blog talks about an interesting feature in [...]
2009-06-30 at 19:49 |
Nice tip!
Yet another way to do it:
http://codesnippets.joyent.com/posts/show/2073