I've a file of source code written in a programming language (e.g. PHP) and I would like to convert it into a HTML file, so I can publish it on web in order to share my code.
By conversion I mean, for example, converting new lines into <br>
tags so that the text will keep the same formatting both in the text editor and in the web browser. Ideally it should also preserve syntax highlighting so it can be also printed.
Is this achievable in Vim? If so, how?