Is there a way to set the Rstudio Theme info in .Rprofile file?
I see lots of references on how to change the editor theme using the Rstudio IDE. https://support.rstudio.com/hc/en-us/articles/115011846747-Using-RStudio-Themes and this SO responce: Altering RStudio Editor Theme
I would really like to port my preference as part of my .Rprofile file to each new projects as I work on them or as part of a container build.
The current theme values can be viewed using the function getThemeInfo()
from rstudioapi, but have no idea how to set the theme or the $editor, $global, and $dark theme parts of the theme info.
> rstudioapi::getThemeInfo()
$editor
[1] "Merbivore"
$global
[1] "Modern"
$dark
[1] TRUE
You can use rstudioapi::applyTheme(theme_name)
So applying Dracula
theme include the following in your .rprofile
:
rstudioapi::applyTheme("Dracula")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.