[英]How to modify the behaviour of shortcut keybinding in RStudio
Currently in RStudio keybinding CTRL/CMD + SHIFT + B
perform the following job devtools::install()
. 当前在RStudio
CTRL/CMD + SHIFT + B
绑定CTRL/CMD + SHIFT + B
执行以下作业devtools::install()
。
How can I change it to have this behaviour: 我如何更改它以具有以下行为:
devtools::install(build_vignettes = TRUE)
If not, is it possible to create the entirely new keybinding for it? 如果没有,是否可以为其创建全新的键绑定?
You can execute anything by using an add-in. 您可以使用外接程序执行任何操作。 See https://rstudio.github.io/rstudioaddins/ for details.
有关详细信息,请参见https://rstudio.github.io/rstudioaddins/ 。 In summary, you create a small R package containing a function like
总而言之,您将创建一个包含以下功能的小型R包:
installWithVignettes <- function() devtools::install(build_vignettes = TRUE)
then set up a special file in the package inst/rstudio/addins.dcf
that names this as an add-in. 然后在软件包
inst/rstudio/addins.dcf
中设置一个特殊文件,将该文件命名为加载项。 After that you can assign a shortcut to it. 之后,您可以为其分配快捷方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.