Sunday, April 6, 2008

GVim to convert code into html

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.

3 comments:

Scrooloose said...

Howdy chum

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

Erick Fleming said...

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

Anonymous said...

студентки из курска посмотреть онлайн http://free-3x.com/ как научить женщину получать полный и множественный оргазм скачать free-3x.com/ порно школьники онлайн [url=http://free-3x.com/]free-3x.com[/url]