Here's a recipe that's work great for me while developing Ring applications:
- Ensure you have leiningen support properly configured for your projet (do it once if in doubt):
- in the package explorer, select the project, and invoke the contextual command
Leiningen > Reset configuration
- then also invoke the
Leiningen > Update dependencies
command - you should see a
Leiningen Dependencies
virtual node in your project, referencing the direct and transitive dependencies of your project
- in the package explorer, select the project, and invoke the contextual command
- Select the
asdf.handler
file, right click and thenDebug as > Clojure Application
- Open the
asdf.handler
namespace in an editor - With the cursor currently still in the editor, type
Ctrl+Alt+N
to jump to the REPL and switch the REPL's current namespace toasdf.handler
at the same time - Start the app by typing
(app)
+Enter
(orCtrl+Enter
if your cursor is not at the end of the line)
You can now navigate between the editors and the REPL.
- To send editor content to the REPL, select it, and hit
Ctrl+Enter
- If you hit
Ctrl+Enter
without a selection, the whole 'top level expression' (e.g. a defn) will be sent to the REPL - To resend the whole file to the REPL, type
Ctrl+Alt+S
- the whole list of keyboard shortcuts specific to CCW is here: http://code.google.com/p/counterclockwise/wiki/EditorKeyBindingsFeatures
Note that a future version of Counterclockwise will integrate a little bit more with Leiningen 2, but as it currently stands, the very nature of developing ring
applications make it not so painful to bootstrap things as described above, IMHO