Fork me on GitHub

@kommen I just saw an example of multi-line editing in the REPL in the #emacs channel, so considering a pull request that does the equivalent of this, but defined in the usual keybinding form in the Clojure layer. RET creates new lines and indents, C-RET evaluates the expression. This works the same way in other tools, eg. Atom, VSCode, LightTable, rebelreadline, etc

(define-key cider-repl-mode-map (kbd "RET") #'cider-repl-newline-and-indent)
  (define-key cider-repl-mode-map (kbd "C-<return>") #'cider-repl-return)


@jr0cket I’ll recheck the RET behaviour in my pull request. it works on my machine:tm:. but i’ll make my colleagues try it as well.


I considered the repl behaviour like you suggest, but I think the main reason why cider by default has RET mapped to cider-repl-return is that people are way more likely type single line forms in the repl than multi line forms


for multi line forms, having them in buffers and eval them there is a much better way anyway


cider has cider-repl-newline-and-indent on C-j, which is shadowed by in spacemacs by cider-repl-next-input unfortunately


I’d rather much more like to come up with an intuitive alternative for that


@jr0cket but I think we still should discuss this with the spacemacs maintainers. care to file an issue about this? would be interesting to know if they want to be closer to cider’s default behaviour or closer to other editor implementations