Cancel multiline input with `Esc` at console
Multiline input at the console cannot be cancelled with Esc but only ctrl+c:
I realise this design was decided at #2905. The discussion there noted people might be asking in the future, and this seems about the time people start asking ;)
There might be three things here (where 2 and 3 might be the same technically?):
- Use
Escto clear a one-line input. - Use
Escto interrupt a process. - Use
Escto exit a multiline input.
For 1, I agree with the original discussion that there are better ways like select all and delete.
What I really want to use Esc for are 2 and 3.
For 2, once I start a process I would be unlikely to type anything in the console anymore to avoid cancelling anything (unless I do want to cancel the process). A muscle memory even from RStudio. If I am going to type something it will be in a script. The rare cases where I do type something in the console are when the process is fast so the risk is small. However I do see how this is still debatable.
For 3, I don't usually type anything across multiple lines in the console intentionally. Most often it is because I am missing a closing bracket somewhere and the console starts to wait for me to close it. And it is in this case that I use Esc most often. It is just natural to reach Esc when the console hangs. It would take me some while to adjust if this feature is gone forever.
I understand the intention is to make Esc a safe key to close pop-ups with completions, etc, but that seems like a separate issue to me. That issue is about completions popping up too often/inappropriately, so, in my opinion, the solution should be adjusting the behaviour of completions, and shouldn't be sacrificing Esc. It is still a big issue to me that I am closing autocompletion more often than I actually adopt the completion, and this is not solved by just having a safe key. (I have my share of complaints about autocompletions in #4442.)
I think it would be great if we could have the option to choose if Esc behave the same way as
Escin RStudio, or- current
ctrl+cin Positron.
I think the current behaviour is the right default but I agree it would be nice to make it optional. Ultimately we should make all console shortcuts regular positron keybindings on a context key (as opposed to input handlers on web components) so that users can redefine Esc and other keys to the behaviour they wish.
Multiline input at the console cannot be cancelled with
Escbut onlyctrl+c:I realise this design was decided at #2905. The discussion there noted people might be asking in the future, and this seems about the time people start asking ;)
There might be three things here (where 2 and 3 might be the same technically?):
- Use
Escto clear a one-line input.- Use
Escto interrupt a process.- Use
Escto exit a multiline input.For 1, I agree with the original discussion that there are better ways like select all and delete.
What I really want to use
Escfor are 2 and 3.For 2, once I start a process I would be unlikely to type anything in the console anymore to avoid cancelling anything (unless I do want to cancel the process). A muscle memory even from RStudio. If I am going to type something it will be in a script. The rare cases where I do type something in the console are when the process is fast so the risk is small. However I do see how this is still debatable.
For 3, I don't usually type anything across multiple lines in the console intentionally. Most often it is because I am missing a closing bracket somewhere and the console starts to wait for me to close it. And it is in this case that I use
Escmost often. It is just natural to reachEscwhen the console hangs. It would take me some while to adjust if this feature is gone forever.I understand the intention is to make
Esca safe key to close pop-ups with completions, etc, but that seems like a separate issue to me. That issue is about completions popping up too often/inappropriately, so, in my opinion, the solution should be adjusting the behaviour of completions, and shouldn't be sacrificingEsc. It is still a big issue to me that I am closing autocompletion more often than I actually adopt the completion, and this is not solved by just having a safe key. (I have my share of complaints about autocompletions in #4442.)I think it would be great if we could have the option to choose if
Escbehave the same way as
Escin RStudio, or- current
ctrl+cin Positron.
Please, do not forget this request.