3 ms·
This is an awesome feature. Naturally, Emacs also supports this, right out of the box. Just use M-x htmlfontify-buffer. Here's a sample of the output: http://i
by tikhonj 15y ago
This is an awesome feature. Naturally, Emacs also supports this, right out of the box. Just use M-x htmlfontify-buffer.
Here's a sample of the output: http://inst.eecs.berkeley.edu/~tikhon/Interpreter.hs.html http://inst.eecs.berkeley.edu/~tikhon/Interpreter.hs.html
EDIT: Also, note that while the VIM one uses a bunch of <font color="..."> tags, the Emacs one uses a bunch of span tags with reasonable class names like "function-name" or "string", so it produces much nicer code and is easy to use with your own CSS.
- freestyler 15y agoM-x htmlize-buffer
- tikhonj 15y agoHmm, on mine (GNU Emacs 23.3.1 on Fedora) it's M-x htmlfontify-buffer. It came with the Emacs distribution as standard. I suspect htmlize-buffer is either from some external package or from a different version of Emacs.
- freestyler 15y agoIt's from an external package called htmlize http://www.emacswiki.org/emacs/Htmlize http://www.emacswiki.org/emacs/Htmlize
- daflip 15y agoVIM too can be told use span tags and css rather than lots of messy font tags, relevant .vimrc goodness: let html_use_css=1 let use_xhtml = 1