Programmer's Weblog

GVim to convert code into html

Sunday, April 6, 2008

Few are aware of the fact that gvim can generate html for the code inside the buffer. The command is :TOhtml; just type it in, and the html will promptly appear in a split window.

In the browser, the generated html should look exactly as you see it in gvim. By default it generates html that should work in old browsers too, but can be told to generate CSS stylesheets or even xhtml. Type :help TOhtml for more details.

It works only in gvim, though; not in vim. It is handy for posting snippets of code on the web.




Blogger Scrooloose
September 5, 2008 at 12:52 AM

Howdy chum

This command does work in vim. I use it on my blog to format code snippets.

Blogger Erick Fleming
November 16, 2008 at 6:53 PM

Just found this. Love the fact that I learn something new in vim every other day.

Anonymous Anonymous
November 4, 2009 at 7:19 AM

студентки из курска посмотреть онлайн как научить женщину получать полный и множественный оргазм скачать порно школьники онлайн [url=][/url]

leave feedback