I think this should map to the keys ctrl+c as it does in lein repl and Rebel Readline https://github.com/bhauman/rebel-readline#key-bindings
@bpringe
What does "abort editing the current line" in this context exactly mean? Just for my understanding.
Like you can do in a terminal. When you have a bunch of text on the command line and just want to get rid of it. You press ctrl+c and get a fresh prompt.
@PEZ @bpringe
Okay I understand but Ctrl+C is not a good shortcut because it is used for copy/paste.
@PEZ @bpringe
I would suggest Ctrl+N which right now will open an empty editor window even if pressed inside the REPL Window. To clear the currrent model seems a good action for this in the REPL. What do you think?
@PEZ @bpringe
I proposed an implementation for that just to see how it looks and feel.
It makes sense to use ctrl+c since that is what is used in a terminal (at least unix terminals). They map it such that if there is something selected it copies, otherwise it cancels the prompt.
@PEZ @bpringe
Ctrl+C is not going to work - this is a terminal thing only.
Fair enough. If it doesn't work, it doesn't work. :smile:
@PEZ
I would not want to trade copy/paste for this feature. Would you?
No. And in the terminal you don't. But if it can't be done like that, I have no problem with dinner other shortcut.
I'm not sure I think the feature is all that necessary actually. You can clear the prompt with Select all followed by backspace or del. I think that is enough.
@PEZ
Technically you can select any keyboard shortcut you want. I simply implemented it right now with Ctrl+N. I find it not that unappealing to clear the edit area without loosing the previous output but anyway.
I haven't tried your PR. Is something different happening when pressing ctrl+n than if you press ctrl+a backspace?
I'm not sure I think the feature is all that necessary actually. You can clear the prompt with Select all followed by backspace or del. I think that is enough.
I thought about this after creating this issue. 馃槢 I'm fine with not adding it, but if @cfehse already made the change and it works, maybe we should just merge it, even if it's another key combo? Up to you guys.
I think we shouldn't do this. Too small gain for the cost of more code to
maintain. To leverage any of the benefit with a second shortcut to clear
the prompt, we would need to use the precious space of the REPL window
where we give tips today. Then we could as well tip about the existing
shortcut.
But, it鈥檚 probably better we write a short guide to the window where this
sort of tips could fit better.
@PEZ @bpringe
I am perfectly fine with this decision.
Cool, then let's do it that way. I'll create a new issue for the general need of REPL window usage information. We can keep this one open, until I've created the other one.
I'll create a new issue for the general need of REPL window usage information. We can keep this one open, until I've created the other one.
@PEZ Was this new issue created? If so we can close this one.