Hacker News new | ask | show | jobs
by stinkypete 4897 days ago
You might try starting rlwrap with the `-m' option (--multi-line) which by default escapes " \ " into newlines. By itself this isn't all that useful but this enables editing the line in your $EDITOR via `ctrl-^'. When you do this the editor will display the escape sequences as literal newlines, so that means you can do multi-line editing with up to recall a previous expression and `ctrl-^' to edit it.

If you're to the point where you are editing lots of multiline expressions you may want to consider using an editor that has a function that will send the contents of a buffer or the current expression to a running interpreter. Emacs is an obvious choice for this, but there are lots of plugins to other editors/IDEs that do the same.