
tmTheme files are very general and may include any scope the writer wishes however, RStudio only supports a certain set of scopes. Simply rename it to the css file you want to replace and put it in RStudio's theme folder.To create a new tmTheme from scratch you can use a tmTheme editor like this one, or write it by hand. If you like the Atom theme “One Dark” and you would like to have it as a RStudio theme, you can find it on my GitHub account.

To make changes permanent, take a look at what theme you want to overwrite, search its corresponding css file name, and enter your changes there. Please keep in mind that any changes you make when inspecting the editor theme will only be temporary. ConclusionĬustomizing RStudio themes requires some little tricks, but it is definitely doable. If you change the file corresponding to the dawn theme (97D3C…), you will have permanently changed that theme. Next, navigate to the css files as shown below You should now find yourself in the directory Contents. Simply navigate on the program folder with your finder, right-click on the RStudio logo and click on “show package content” (or something similar to that sorry, my system language is German )). However, we want to make things permanent, which is our next step.Īs I have already mentioned, an editor theme in RStudio essentially is a css file lying somewhere on your computer, so all R themes can be accessed through your file system. This can be handy if you just want to play around. If you reopen RStudio, everything is gone. So far, we have temporarily changed the theme. Second step: Overwrite the theme on your file system Furthermore, I add another attribute font-size to make the text larger. That's why I decide to make the font bold and change the color to red. Let's say I don't like it being italic and I want to change the color to be a bit more … noticeable. ace_comment which defines the physical appearance of comments in the code. Perfect! Now, you can mess around with the css selectors' attributes and view the result on the theme in real time (unfortunately, you cannot rearrange the selectors)! As an example, I will change the selector. Simply click on the path to the css file to view its content. You should remember the filename of the corresponding css file, because we will change that file on our file system later. Scroll down until you find the tag referencing a css file. Now, if you want to experiment with changing it, recall that RStudio actually is a browser, so right-clicking somewhere in the text editor and selecting “Inspect Element” should open the HTML the editor is based on. First step: Change a theme until you like it We will eventually access those files and change them. To understand what will be going on, be aware that the RStudio IDE in fact works like a browser and the styles and themes you have at your hand are essentially css files lying somewhere in your file system. For the sake of demonstration, I will do that with the dawn editor theme in RStudio version 1.1.419. In the end, what we will do is overwriting the settings of one theme with your own preferences. Second, you have to sacrifice one of RStudio's built-in editor themes, so choose wisely. However, I think things should work similarly when having Windows on your computer.


Well, before we get started, I've got some sad news for you: first, I use a Mac, so all the instructions pertain to that platform. That being said, I did some research on how to customize its themes by hand with a little hack! Here you go! Customizing your theme This is sad, especially if you like working with RStudio but are not satisfied with its appearance. RStudio is a powerful IDE that helped me so many times with conveniently debugging large and complex R programs as well as shiny apps, but there is one thing that bugs me about it: there is no easy option or interface in RStudio that lets you customize your theme, just as you can do in more developed text editors such as Atom or Sublime.
