Syntax highlighting clojure code

194 views
Skip to first unread message

Stefan Arentz

unread,
Nov 2, 2009, 6:41:37 PM11/2/09
to Clojure
I want to post some Clojure code to my blog. Does anyone know of a
simple, preferably online, code highlighter for Clojure or Lisp that
turns code into simple html with either a stylesheet or just <font
color=""> tags?

S.

Timothy Pratley

unread,
Nov 2, 2009, 6:47:37 PM11/2/09
to Clojure
VIM makes this very easy
:TOhtml

Tassilo Horn

unread,
Nov 3, 2009, 12:06:31 AM11/3/09
to clo...@googlegroups.com
Timothy Pratley <timothy...@gmail.com> writes:

> VIM makes this very easy
> :TOhtml

And for emacs, there's htmlize.el.

Bye,
Tassilo

Miron Brezuleanu

unread,
Nov 3, 2009, 1:47:25 AM11/3/09
to clo...@googlegroups.com
Hello,

Try putting the code in a gist on GitHub then use the 'embed' link on
the gist page in your blog post (this adds a script to the page, so it
doesn't fit your 'simple html' requirements [1] , but I thought it's a
neat alternative anyway).

Cheers,
--
Miron Brezuleanu

[1] The script does add simple html + css though, at least that'st
what a bit of inspection with Firebug reveals.

Christophe Grand

unread,
Nov 3, 2009, 3:02:08 AM11/3/09
to clo...@googlegroups.com
pygments (which is used by github) does a good job too.
--
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.cgrand.net/ (en)

Patrik Fredriksson

unread,
Nov 3, 2009, 3:34:44 PM11/3/09
to Clojure
I have used SyntaxHighligter (http://alexgorbatchev.com/) on my blog
with the Clojure brush from http://www.undermyhat.org/blog/2009/09/list-of-brushes-syntaxhighligher/

It seems to work fairly well.

/Patrik
Reply all
Reply to author
Forward
0 new messages