Dark themes for writing

I spend much of my day sitting in front of a screen, coding or writing. To limit the strain on my eyes, I use a dark theme as much as possible. That is, I write with light colored text on a dark background. I don’t know why this is not the default in more software as it makes a big difference after a few hours of writing.

Most of the time, I am writing using either Sublime Text, RStudio or TeXstudio. Each of them can be set to use a dark theme with syntax coloring to highlight structural features in the text.

Sublime Text

Sublime Text is a wonderful editor and I am spending more of my time in it than anywhere else. The default color scheme is very well chosen — Monokai. I use that, coupled with the Numix theme, as shown in the screenshot below.

Screenshot from 2015-03-18 13:04:50


RStudio now has a few dark themes available, including Monokai (although it is not the default). Go to Tools, Global Options, Appearance, and select the Monokai theme (or whichever other one takes your fancy). Here is a screenshot of RStudio as I use it.

Screenshot from 2015-03-18 13:09:02


I tend to use Sublime Text for LaTeX editing these days, but occasionally I might open TeXStudio. Unfortunately the default theme is not dark, and it is very difficult to edit the color scheme. From the menus, choose Options, Configure TeXstudio, Syntax Highlighting. Then you have to edit each color individually.

It is possible to save the scheme in a profile file, and then load it on another computer. Several dark themes have been proposed on TeX.stackexchange.com. I edited one of them to create my own theme shown below.

Screenshot from 2015-03-18 13:11:22

Here is the profile file that implements the above scheme. You should be able to load it in TeXstudio (after which you will need to re-start TeXstudio to see the effect).

Related Posts:

  • David Stern

    Most people find it much harder to read, I think.

  • Janko Thyson

    I like dark themes a lot as well and after reading your post was quite excited that RStudio now ships with Monokai. However, I can’t seem to find it in the latest Windows version (0.98.1103). Which version and OS are you using?

    • I’m using version 0.99.292 on Ubuntu. But themes have been available on all OSs for ages. Look under Tools and Global Options.

      • Francesco S.

        Hi Rob, I have checked in RStudio (Version 0.98.1102) under Global Options -> Appearance but there isn’t Monokai.

  • vzemlys

    Strange, for me it is the opposite. Dark themes strain my eyes, hence I have strong dislike for them.

  • Even though I only use the default theme, there are a wide range of different color schemes to choose from on Overleaf — see this post https://www.overleaf.com/blog/194-new-year-new-name-new-free-features#!themes for more details.

    (PS: I’m one of the founders of Overleaf, so if you use it, any feedback is appreciated, thanks!)

  • buggyfunbunny

    Well, if it were really all that better, we’d have figured out, over the last few thousand years, how to print books thus. Doesn’t seem to be a problem. All of those folks with Kindles and Nooks and such would have made the switch, too. I don’t believe they have.

  • David Burton

    I quite like dark themes in general stylistically, but I find that it’s much worse affected by reflections from windows, etc, as the light text becomes hard to read – I’ve had to switch to a light theme at my current workplace to improve readability

  • Samohyl

    Thanks this was really helpful

  • Xi’an

    Thank you Rob, being as well a Dark Side supporter, now I have no reason no to switch to R studio!

  • aeon

    Thanks for sharing the profile. I very much appreciate that you put work into that, and spared me to do it myself.

  • Andrew Jackson

    I really like the dark theme in Rstudio, but one issue I find frustrating is that when the mouse pointer turns into a vertical bar style when hovered over a script or cmd window, it can be very difficult to locate it on the screen.

    • Eduardo Tabacman

      I agree 100%. Has anyone found a solution to this problem?

  • kn1g

    Hi, I love dark themes. Started with Sublime. Working in RStudio all day with a dark theme. But there is one thing that’s really annoying. The dark theme Support in RStudio is buggy. I googled all day long to find a way to change the highlight color (e.g. if you search for words etc.). Dark highlight on dark background… RStudio needs to change this to make the dark themes complete.

  • I wish RStudio team will add more configuration on the theme of the UI, it’s good to have dark themes on the editor and console. But it would be best if we could change the overall theme of the UI, like that in sublime, or in PyCharm there is a Darcula theme.

  • Erik

    If you have a mac, then you can press command + option + ctrl + 8 to invert the entire screen.

  • Thank you, the TeXstudio theme is great!