If you use Emacs, you can convert everything you see on the screen to an HTML file with almost exactly the same look and style. The package you need is htmlize.el. Some Emacs distributions, such as Carbon Emacs, package this module by default. This page shows an example. Really fantastic! It goes far beyond any similar methods I am aware of so far.
And using vim:
http://targetgoogle.blogspot.com/2007/05/converting-c-code-into-html.html
This is cool! After you got the html file, do you have to host it somewhere on the web to be able to view it? Like this one, you hosted on freeweb.com?
http://www.freewebs.com/attractivechaos/kalloc.c.html
I’m new to wordpress and I tried to upload html file but it doesn’t allow this format..
Thanks!
You can view it locally in a browser.
I got that.. but if I want to post it in wordpress, then I have to put it somewhere on the web?
Thanks for the super fast reply!