使用VSCODE添加四分之一文档中R块的键盘快捷键
是否可以使用VSCODE在四分之一文档中为r
块添加键盘快捷键?
我正在尝试使用管道操作员%>%
(ctrl+shift+shift+m
)等快捷方式。我认为我应该通过在keybinds.json
文件中包含以下代码来做到这一点,但这对我不起作用:
{
"key": "ctrl+shift+m",
"command": "type",
"when": "editorLangId == 'r' || editorTextFocus && editorLangId == 'qmd'",
"args": { "text": " %>% " }
},
Is it possible to add keyboard shortcuts for R
chunks in quarto documents using vscode?
I'm trying to use shortcuts like the pipe operator %>%
(ctrl+shift+m
) and others. I thought I should do this by including something like the code below in the keybinds.json
file, but it doesn't work for me:
{
"key": "ctrl+shift+m",
"command": "type",
"when": "editorLangId == 'r' || editorTextFocus && editorLangId == 'qmd'",
"args": { "text": " %>% " }
},
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设
keybinds.json
是您帖子中的错别字(正确的文件名是keybindings.json
)。只要我已经正确理解您,这是我的
keybindings.json
ctrl+shift+m,然后在光标的当前位置放置“%>%”。
I assume
keybinds.json
is a typo in your post (the correct filename iskeybindings.json
).Provided I have understood you correctly, here is my
keybindings.json
Ctrl+Shift+m then places "%>%" at the current position of the cursor.