I have a file open in Emacs which highlights the syntax and I want to share the file (with syntax highlighting) with another person who does not use Emacs.
Is it possible to export the file open in Emacs with syntax highlightning?
Any target format is ok: e.g. HTML, PDF, Image
You can use the command M-x htmlfontify-buffer
to create an html file with syntax highlighting from any buffer.
It's included in standard Emacs, definitely in version 24, I'm not sure about 23.
You can use htmlize-buffer
that comes with 'htmlize.el' (find it at http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.cgi (dead link?) or install from MELPA or download from the htmlize Github project. This will create a HTML file with all the syntax highlighting of your current buffer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With