I have been using vi (and then vim) since nineties 

I love and hate it…

I love it because it works on almost all platform I have been using during these long years and also it is very powerful.

At the same time I hate it because of its visual vs insert modes. O.O

Anyway I use it frequently (vim) and sometimes I discover new functionalities.

Today I encounter the capability to export syntax highlighted code in html format.

vim

Simply issue the following command

:runtime! syntax/2html.vim

a new buffer will appear

Now just save it as usual

:w myfile.html

Gg1