On Sun, Aug 7, 2011 at 6:17 AM, Philipp Steinwender
<[email protected]> wrote:
> Is there a tool available that does indentation of clojure code and does not
> depend on an editor/IDE?
> we work on the same code together with different editors
> (eclipse+counterclockwise and emacs). We often reindent the other's code
> what leads to changes when we merge our commits with git.
> one way to fix this would be to reindent all source files with an indepedent
> tool before commiting.
I've tried pprint and found it lacking as it inserts newlines in
awkward places apart from the medatada/comments issue mentioned.
I think your best bet is to use Emacs from the command-line. Even if
people edit outside Emacs, it's easy to invoke for indentation
purposes:
$ emacs --eval "(progn (find-file \"badly_indented.clj\")
(indent-region (point-min) (point-max)) (untabify (point-min)
(point-max)) (save-buffer) (kill-emacs))"
-Phil
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
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