I am not looking for an IDE or integrated REPL. I just wanted to ask if anyone knows if there is a buffer editor in the REPL editor, as is known from "psql" or some * nix shells.
In psql, for example, you simply enter "\ e" and you will get the last command in your EDITOR, and the top output will be executed.
That would be great for clojure repl.
$ java -cp jline.jar:clojure-1.3.0.jar jline.ConsoleRunner clojure.main
So, is there such a feature? Where should this be implemented in jline?
Decision:
rlwrap does the trick.
I had to compile readline ftp://ftp.gnu.org/gnu/readline/ and then rlwrap http://utopia.knoware.nl/~hlub/rlwrap/#rlwrap .
After that, I could use the following shortcut to start the editor.
Ctrl + ^
rlwrap -m -- java -cp clojure-1.3.0.jar clojure.main
To use leiningen on Mac OSX, I had to change the following:
lein 1.6.2 *** 226,233 **** rlwrap -m -q '"' echo "hi" > /dev/null 2>&1 if [ $? -eq 0 ]; then RLWRAP="$RLWRAP -r -m -q '\"'" - else - RLWRAP="$RLWRAP -m --" fi fi fi --- 226,231 ----
and export RLWRAP_EDITOR
export RLWRAP_EDITOR="vim +%L"
source share