How to indent clojure code in Emacs

2014-01-03 Thread tao
https://github.com/clojure-emacs/clojure-mode I have installed this plugin, but I don’t know how to indent clojure code, when I already selected a region. In Vim, I can do this using “=“, just a simple key stroke. This a problem when I copy some clojure code from other place, not typed in.

Re: How to indent clojure code in Emacs

2014-01-03 Thread tao
C-x h selects the entire buffer. C-M-\ reindents the selected region. http://stackoverflow.com/questions/11423566/how-do-i-intelligently-re-indent-clojure-in-emacs sorry, I have found the answer. -- tao Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Friday, January 3, 2014 at

Re: How to indent clojure code in Emacs

2014-01-03 Thread dennis zhuang
use the 'indent-region' function.You can define a function to indent the whole buffer: (defun indent-buffer () Indent whole buffer (interactive) (indent-region (point-min) (point-max)) (message format successfully)) Then bind the function to a key, i bound it to F7 for me:

How to indent clojure code in Emacs

2014-01-03 Thread Stefan Kamphausen
Hi, FWIW, I prefer M-C-q with the cursor on the opening paren of a form. Cheers, Stefan -- -- 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 Note that posts from new members are moderated