【问题标题】:Set the Rstudio theme info in .Rprofile file在 .Rprofile 文件中设置 Rstudio 主题信息
【发布时间】:2018-08-15 17:34:53
【问题描述】:

有没有办法在 .Rprofile 文件中设置 Rstudio 主题信息?

我看到很多关于如何使用 Rstudio IDE 更改编辑器主题的参考资料。 https://support.rstudio.com/hc/en-us/articles/115011846747-Using-RStudio-Themes 和这个 SO 回复:Altering RStudio Editor Theme

我真的很想将我的偏好作为我的 .Rprofile 文件的一部分移植到我处理每个新项目或作为容器构建的一部分。

可以使用rstudioapi的getThemeInfo()函数查看当前的主题值,但不知道如何设置主题或主题信息的$editor、$global和$dark主题部分。

> rstudioapi::getThemeInfo()
$editor
[1] "Merbivore"

$global
[1] "Modern"

$dark
[1] TRUE

【问题讨论】:

    标签: r rstudio


    【解决方案1】:

    您可以使用rstudioapi::applyTheme(theme_name)

    因此,应用Dracula 主题在您的.rprofile 中包含以下内容:

    rstudioapi::applyTheme("Dracula")

    【讨论】:

      猜你喜欢
      • 2013-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-09
      • 2015-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多