Syntax Highlighting

Vim Tip – Convert Code To HTML

If you wrote some elegant code, and want to publish it as a HTML page, you can easily do that in vim:
In command mode, type this:

:TOhtml

A new buffer will be opened with the HTML source, just save it:

:wq

If the original file name was “mycode.c”, you’ll find a new file in the same directory named “mycode.c.html”. Open it with your favourite web browser.

Wow, not?
Have fun ;-)

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: ,

Saturday, April 24th, 2010 Vim No Comments
my email
my photo
Hi,
My name is Amir Watad. I have a BSc. in biomedical engineering from The Biomedical Engineering school , Technion , Israel, and a BSc. in electrical engineering from The Electrical Engineering school , Technion , Israel.
I'm a Verification Engineer in Mellanox Technologies Ltd.
I love Linux, the Command Line and the OpenSource Community.
I used to write Poems (Arabic) when I was able to find time for this.
February 2012
S M T W T F S
« Sep    
 1234
567891011
12131415161718
19202122232425
26272829  
SEO Powered by Platinum SEO from Techblissonline

Twitter links powered by Tweet This v1.7.4, a WordPress plugin for Twitter.