-
In RStudio, the escape key clears any text at the console prompt. In Positron the escape key doesn't do this (or anything else) if the cursor is at the console prompt. Is there any way to change Positron to the RStudio behavior? (Interestingly I just opened a naked R session and there hitting escape seems to give you a new prompt line without executing the code, which is confusing.) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I agree, ESC would be great. However, for now it appears CTRL-C gives you a new prompt line without executing the code. |
Beta Was this translation helpful? Give feedback.
-
We intentionally removed this behaviour because escape is also used to close popups. It's easy to hit escape one time too many and get your input accidentally cleared out. In addition to Ctrl-C you can also use Ctrl-U. Both of these also work in terminals, which is a nice consistency. Or Ctrl-A / Cmd-A to select all the input and get the selection replaced by the next character you type. |
Beta Was this translation helpful? Give feedback.
-
I just wanted to add a little bit to the discussion here in case anyone else is looking for how to interrupt or cancel the running console execution. I understand the reasoning behind the removal of this RStudio feature as it has caused countless unintentional interruptions of running code. However, for me, it was a nightmare to find information about how to interrupt the running code in the console in Positron - until this post; |
Beta Was this translation helpful? Give feedback.
We intentionally removed this behaviour because escape is also used to close popups. It's easy to hit escape one time too many and get your input accidentally cleared out.
In addition to Ctrl-C you can also use Ctrl-U. Both of these also work in terminals, which is a nice consistency. Or Ctrl-A / Cmd-A to select all the input and get the selection replaced by the next character you type.