Convert a Vim Window to HTML

Apr 11, 2012

By Jamison Dance

More blogging as remembering stuff. If you want to convert a Vim buffer to HTML, syntax highlighting and color theme and all, use this command:

:TOhtml

It opens a new buffer full of HTML that will look pretty much like your Vim window when opened in a browser. Warning, this will include line numbers and other weird things, so you might have to tweak Vim if you want to make copy-paste friendly code.

Jamison cares about family and JavaScript programming and React Rally and Soft Skills Engineering and JavaScript Jabber and 🏋️ and 🏂 and computing and business and Fivestack and the Dunning-Kreuger effect. He is a real human bean who you can reach on twitter.