Any way to change colors in Rstudio to something other than default options?

后端 未结 6 495
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 11:46

Is there anyway to change the color schemes for Rstudio? It comes with 6 or 7 default, pre-packaged

6条回答
  •  灰色年华
    2021-01-30 12:27

    I found a hack to do this in RStudio 0.99.879 on the Mac.

    In /Applications/RStudio.app/Contents/Resources/www/rstudio/ there are a bunch of files with extension .cache,.css. These are the files holding the themes' formats. Since the names aren't descriptive I had to experiment to find which one went with the theme I wanted to edit.

    I wanted to modify the TextMate theme, so here are my steps:

    1. In RStudio Preferences > Appearance set the editor theme to TextMate.
    2. Open an R file in the editor pane. It should have enough code to cover the formatting you want to change, e.g. comments, functions, keywords, lists...
    3. Quit RStudio.
    4. Then repeat the following procedure till you find the right file.
      • Open a .cache.css file.
      • Edit the .ace_comment to be yellow, i.e.
        • .ace_comment {color: rgb(255,255,0);}
      • Open RStudio and see if the comments are yellow.
    5. Once I had the TextMate .cache.css file I had to play with it by editing the file, quitting and reopening RStudio in order to figure out which css properties controlled the formats I wanted to change.

提交回复
热议问题