Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I intelligently re-indent Clojure in Emacs?

Tags:

emacs

clojure

I'm new to Clojure and new to Emacs.

Is there an Emacs short-cut to intelligently re-indent the whole file? if not, is there at least a way to indent selected regions left or right?

I feel like I'm back in the stone age repeatedly pressing the arrows

like image 796
Nathan Avatar asked Jul 10 '12 23:07

Nathan


2 Answers

C-x h selects the entire buffer. C-M-\ reindents the selected region.

like image 159
user100464 Avatar answered Oct 04 '22 04:10

user100464


Ctrl-x, h (select all) followed by Tab (to indent)

like image 25
joelittlejohn Avatar answered Oct 04 '22 03:10

joelittlejohn