Paredit
ParEdit, a.k.a. "structured editing", is some special editing operations for S-expression coding, like Lisp or Clojure. Mainstream IDEs all have support for paredit.
Eclipse
Install clojure IDE plugin counterclockwise. It's default shortcuts is listed in Editor Keyboard Shortcuts;
Cursive
Cursive: install IntelliJ and Cursive plugin, see default shortcuts definition at Structural editing;
REPL for Ring Application
Say the application name is "guestbook" (based on "Web Development with Clojure" by Dmitri Sotnikov).
Eclipse
The counterclockwise plugin need to be installed beforehand.
-
Build a new "Clojure Project" with name "guestbook", set "Leiningen template" as "compojure-app";
-
Open guestbook.routes.home.clj, and run menu item [Clojure -> Load file in REPL];
-
In REPL window (the window title is "REPL @ nrepl://127.0.0.1:xxxx(guestbook.routes.home)", run (use 'guestbook.repl) and (start-server), you can use Ctrl+Up/Down to navigate in command history;
-
See homepage with url "http://localhost:8080";
-
Modify codes, refresh web page to see the result. If this doesn't work, close the REPL window and restart server;
Cursive
-
In terminal:
lein new compojure-app mybook
; -
In Cursive, import "mybook" via "Import Project", choose "Leiningen" for "Import project from external model";
-
Open "Terminal" window in Cursive, run
lein repl
, (use 'guestbook.repl) and (start-server); -
See homepage with url "http://localhost:8080";
-
Modify codes, refresh web page to see the result. If this doesn't work, restart server in "Terminal" window;
Note: I've tried Light Table. It can open the guestbook project created by leiningen, but can't connect to it. So I give it up, and use Eclipse instead.