Why do you write code in the REPL directly? Write it in a buffer and send it to the REPL.
>I want to use the REPL as a _interactive_ REPL, where I can write my code and later copy that to the file
Just write in the normal editor, and evaluate interactively code from there. Emacs does that too
Re:Sublime Clojure
by ReleaseCandidat on Wednesday December 15, 2021 @03:18AM
(#29563278)
Yes, but I don't have to, because with Emacs I have (almost) the same editing capabilities in the REPL.
Why? Then you have to copy it from the REPL into the file later instead of already having a working version in the file. This makes zero sense.
Why do you want to code in the repl when you can code in the editor and eval in the repl?
Re:Sublime Clojure
by ReleaseCandidat on Wednesday December 15, 2021 @03:30AM
(#29563358)
Because I gain nothing when writing in the editor window - because in _Emacs_ the REPL window works (almost) the same as the editor.
A REPL with Paredit, autocompletion and 'normal' editing capabilities is what I want. That's why I often program other languages (that have a REPL, but no way to comfortably edit using it, like Haskell, PureScript, Elixir, OCaml und Rust) using Jupyter notebooks, which is the same as evaluating inline - that's better than the 'normal' way (only seeing errors/warnings/... inline) but it's not the same experience.
But I do not want them inline. I want to use the REPL as a _interactive_ REPL, where I can write my code and later copy that to the file. That's actually one of the reasons I still use Emacs: Common Lisp with Sly and Clojurescript with Cider.