Search code examples
eclipseclojureshortcutread-eval-print-loopcounterclockwise

Eclipse - Clojure - Counterclockwise plugin - shortcut for evaluating selection in REPL namespace (not file namespace)


Suppose I have my first file/namespace with the following:

(ns a)

I run this to get a repl with 'Clojure/Load File in REPL'

Then I open up a second file/namespace with the following:

(ns b)

(ns c)

(println *ns*)

Suppose I select the (ns b) and hit Command-Enter (on my mac - on windows it would be CTRL-enter). Then I select the (ns c) and hit Command-Enter.

Then I select the (println *ns*) and hit command-enter - then I get:

#<Namespace b>

Because the shortcut Command-Enter evaluates the hilighted text not in the repl namespace but the file namespace.

Is there a shortcut to evaluate the selection in the repl namespace?


Solution

  • Looks like no, not directly. However, there is a shortcut to switch the repl to the namespace of the current file and then you could execute the code.