如何为基本的赋值运算符(
使其在编辑器中工作是直接的(将内容放入
但我还不太明白终端需要怎样的
根据官方文档上的when子句,我尝试了以下方法:
基于官方文档的额外明确语言ID。
<-
)添加一个键盘快捷方式,使其在编辑器和终端中都可以使用?使其在编辑器中工作是直接的(将内容放入
keybindings.json
)。{
"key": "alt+-",
"command": "type",
"when": "editorLangId == r && editorTextFocus || editorLangId == rmd && editorTextFocus",
// if you want using quarto, try this
// "when": "editorLangId =~ /r|rmd|qmd/ && editorTextFocus",
"args": {"text": " <- "}
}
但我还不太明白终端需要怎样的
when
子句。根据官方文档上的when子句,我尝试了以下方法:
- 使用
terminalFocus
{
"key": "alt+-",
"command": "type",
// "when": "editorLangId == r && editorTextFocus || editorLangId == rmd && editorTextFocus || terminalFocus",
"args": {"text": " <- "}
}
基于官方文档的额外明确语言ID。
{
"key": "alt+-",
"command": "type",
// "when": "editorLangId == r && editorTextFocus || editorLangId == rmd && editorTextFocus || editorLangId == shellscript && terminalFocus",
"args": {"text": " <- "}
}
keybindings.json
文件? - jglad