Change RStudio Editor Theme

I am trying to change the themes of the RStudio editor so that I can set my own colors. I am using RStudio version 0.99.473 on Windows 10.

I looked Any way to change colors in Rstudio to something other than the default settings? which was very useful, as well as Editing R Studio in the cashe.css theme file (ACE editor?)

I am trying to determine what the different .ace_ elements correspond to in the CSS files of the RStudio editor styles (ACE editor code). CSS files are located in / www / rstudio / in the installation path of RStudio. An example script is on GitHub for the Tomorrow theme .

In particular, I look at how color variables (which I define) differ from functions. For example, in x <- rnorm (10,0,10), I would like x and rnorm to be colored differently. Not sure if this is possible.

+5
source share
2 answers

Whatever the cost, the latest versions of RStudio come with a preference that allows you to ensure that function calls are colored differently from variables - from RStudio v1.0.44 we have the option

  • Highlight R function calls

RStudio Options

If this option is active, function calls will be highlighted differently (for example, using the "Tomorrow night" function):

Image Example of Highlighting

We hope that user-customizable themes will be part of the next release of RStudio.

+5
source

RStudio has a tutorial . Although this does not apply to your question about coloring variables, I changed the selection of matching parentheses in my subject so that they are more visible. Here's how:

Select a theme from this theme editor and save it on your computer as a .tmTheme file. Add a theme to RStudio. RStudio automatically creates a .rstheme file from this. I found the rstheme file in my Users/Eric/Documents/.R/rstudio/themes (on a Windows machine). Open the file in Notepad ++ (or in your favorite text editor) and find the .ace entry corresponding to the one you want to change (for me, in particular, .ace_bracket from the RStudio tutorial that I mentioned earlier). This will have an rgba value similar to the following: background-color: rgba(238, 252, 81, 0.8); Note that the last value is the alpha (transparency) value and should be between 0 and 1. The values ​​I use give me a bright bright yellow that is easy to see.

0
source

Source: https://habr.com/ru/post/1259125/


All Articles