Hacker News new | past | comments | ask | show | jobs | submit login
Save Vim syntax highlighting to HTML (cslife.wordpress.com)
19 points by r11t on Dec 3, 2008 | hide | past | favorite | 7 comments



The standard shortcut for this is :TOhtml (although I always screw it up and type :toHTML). Of course, you can ":help TOhtml" to get more info.


vim can do anything you can imagine, better than you imagined. If only you knew the command...

One for me was word completion to match other words in the file (^n, where ^ is control), but based on filenames (^x^f^n).


For emacs see htmlfontify.el ( http://www.emacswiki.org/emacs/HtmlFontify ).



Now if only I could bring myself to put font tags anywhere near a page. :\


You don't have to. As jmah said above, :TOhtml is the standard way to do it. First, you can issue the command :let html_use_css = 1. Highlight some code and enter :TOhtml, and you'll have non-font-tag-ified, css-ified HTML that uses your syntax highlighting.


now someone should write a blogpost comparing that to using http://pygments.org/




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: