英文:
how to make the radian console stop listening to rendered output?
问题
I use the radian console in VSCode.
To replicate my problem, run:
learnr::run_tutorial("Hello", package = "learnr")
The tutorial (which is basically a shiny app) pops up in a viewer and the output of the console is this:
Loading required package: shiny
Listening on http://127.0.0.1:7513
Browsing http://127.0.0.1:7513
All of this is perfectly fine, but:
The usual radian console r$>
prompt disappears and I do not know how to get it back. Each time I have to close the current console and open a fresh instance.
I know that when rendering tutorials in RStudio, a "Job Output" Tab is opened in a separate console, and I can stop the running Job (e.g. listening to the active shiny app) with a button.
How can I get back to interactive mode from "listening to job output mode"?
I tried different key presses, tried to look up radian
wiki and FAQ, looked for buttons in VSCode.
英文:
I use the radian console in VSCode.
To replicate my problem, run:
learnr::run_tutorial("Hello", package = "learnr")
The tutorial (which is basically a shiny app) pops up in a viewer and the output of the console is this:
Loading required package: shiny
Listening on http://127.0.0.1:7513
Browsing http://127.0.0.1:7513
All of this is perfectly fine, but:
The usual radian console r$>
prompt disappears and I do not know how to get it back. Each time I have to close the current console and open a fresh instance.
I know that when rendering tutorials in RStudio, a "Job Output" Tab is opened in a seperate console, and i can stop the running Job (e.g. listening to the active shiny app) with a button.
How can I get back to interactive mode from "listening to job output mode"?
I tried different keypresses, tried to look up radian
wiki and FAQ, looked for buttons in VSCode.
答案1
得分: 2
以下是您要翻译的内容:
默认是 ctrl + c
。然而,如果您想更改它,您可以将以下内容添加到您的 keybindings.json 文件中:
{
"key": "Cmd+c",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0003"
},
"when": "terminalFocus || (editorTextFocus && !editorHasSelection)"
}
注意:
Cmd+
部分来自文档。我没有使用Mac,所以我没有测试过,但类似的命令在Windows上有效。"\u0003"
是END OF TEXT的转义序列,用于发送中断到终端。when
子句确保只有在您位于终端中或在编辑器中没有选择文本时才发送中断。这是为了避免在复制和粘贴时发送中断。您可以根据需要更改when
子句或添加其他条件 - 在when子句上下文文档中了解更多信息。
英文:
The default is ctrl + c
. However, if you want to change it, you can add the following to your keybindings.json:
{
"key": "Cmd+c",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0003"
},
"when": "terminalFocus || (editorTextFocus && !editorHasSelection)"
},
Notes:
- The
Cmd+
bit is from the docs. I don't have a Mac so I haven't tested it, but a similar command works on Windows. "\u0003"
is an escape sequence for END OF TEXT that sends an interrupt to the terminal.- The
when
clauses ensure the interrupt is sent only when you're in the terminal, or in the editor and do not have text selected. This is to avoid sending an interrupt when you're copy and pasting. You may wish to change thewhen
clauses or add others - see more in the when clause contexts docs.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论