After I posted this, I realized that it was a little silly to talk about a Lisp editor mode without auto-indentation. It has been added! The main caveat is it doesn't seem to handle multiple unindents with the correctness I would like. For example:
(defn say-hi [n] (println (str "Hello, " n))) ; more code here Obviously, the third line should result in two levels of undindenting. However, due to limitations in the way that jEdit handles auto-indenting, I don't think I can do both levels at once. Specifically, the auto-indenting would assume that the "; more code here" line should be indented at level 1, despite the fact that all parens are closed by that point. It's possible that I may be able to leverage jEdit's brace matching to unindent properly, but that will require some more experimentation. Daniel On Nov 6, 11:41 am, tkosan <[EMAIL PROTECTED]> wrote: > Daniel wrote > > > Mostly for amusement, I created a jEdit mode for Clojure a while > > back. I don't get a chance to play with Clojure all that much, so it > > hasn't been heavily tested ("go-to" *is* a Clojure "keyword", > > right?). ;-) It's primarily based upon the Vim mode in terms of what > > keywords it supports and how. Auto-indentation was something I looked > > at, but it isn't something I actually bothered to support due to time > > constraints (jEdit is capable of some pretty slick auto-indenting > > where Lisp-like languages are concerned). > > This is good timing for me. I am in the process of integrating > clojure into a jEdit-based Mathematics Computing Environment I am > creating called MathRider: > > http://mathrider.org > > MathRider currently includes clojure but syntax highlighting is not > complete yet. I will look at your jEdit mode to see if it is more > functional than what MathRider is currently using. If you have time > to add auto-indentation, that would be great. > > If anyone wants to experiment with clojure in MathRider, there is a > file called clojure_examples.mrw in the "mathrider/examples" > directory. > > Ted Kosan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---