This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-14
Channels
- # announcements (1)
- # beginners (13)
- # calva (2)
- # cider (43)
- # cljdoc (11)
- # clojure (16)
- # clojure-spec (10)
- # clojure-uk (6)
- # clojurescript (7)
- # code-reviews (3)
- # core-matrix (1)
- # datascript (4)
- # datomic (7)
- # devcards (4)
- # figwheel-main (12)
- # fulcro (27)
- # hoplon (1)
- # lein-figwheel (1)
- # luminus (1)
- # nrepl (23)
- # off-topic (4)
- # planck (1)
- # re-frame (8)
- # reagent (7)
- # shadow-cljs (61)
- # spacemacs (7)
- # tools-deps (19)
@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