在 Rmarkdown 中评论的快捷方式? [英] Shortcut for commenting in Rmarkdown?
问题描述
简单的问题:有谁知道Rmd中评论的快捷键吗?
Simple question: does anyone know of a shortcut key for commenting in Rmd?
在 Knitr 中,这可以使用 CTRL + C 来完成,这会在编写和编码环境中生成注释行.不幸的是,这在 Rmd 中不起作用.
In Knitr this can be done using CTRL + C, which produces in both writing and coding environment a comment line. This does not work in Rmd unfortunately.
目前我必须输入:
<!-- Comments -->
我正在使用 R-studio.
I am using R-studio.
推荐答案
在markdown"部分下添加一个片段:
Add a snippet under the "markdown" section:
(我做了我的hcm
)然后输入:
(I made mine hcm
) then type:
hcmShiftTab 它会扩展到任何你想要的(我的是 <!-- -->
)
hcmShiftTab and it'll expand to whatever you want (mine was <!-- -->
)
您也可以缩短摘要文本.
You can make the snippet text shorter as well.
我同意 Ben 的观点,您可以前往 RStudio 支持部门并为此请求一个 kbd 快捷方式.
I agree with Ben that you could go to RStudio support and ask for a kbd shortcut for this.
这篇关于在 Rmarkdown 中评论的快捷方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!