Skip to content

Latest commit

 

History

History
65 lines (35 loc) · 2.46 KB

README.mkd

File metadata and controls

65 lines (35 loc) · 2.46 KB

Kandle Theme for R Studio

Just a dark theme for R Studio, carefully handcrafted to make the world's ugliest IDE look like VS Code! Supports darker plot area, rainbow parentheses, parentheses pair highlight, and function call highlight.

code

Darker plot area

Coding in complete darkness? Brighten the plot area only when mouse-hovering over it. This behavior can eventually be turned on and off in one click (see Usage for details). This does not change the plot's original properties (i.e. when exporting).

plotscreencap.gif

Parentheses pair highlight

Indeed, a very nice animation, and some very nice rainbows too.

par.gif

For a better looking IDE

I recommend in Tools > Global options > Code > Display activating Highlight R Function Calls and Rainbow Parentheses.

I also recommend using the theme in combination with Darkstudio, or something similar.

mainview

Usage

Dependencies:

install.packages(c("rstudioapi","devtools"))

Install the theme:

devtools::install_github('TheMrKingent/KandleTheme')
KandleTheme::installKandle()

To change the behavior of the plot area between bright-on-hover and always-bright, use:

KandleTheme::togglePlotTransparency()

Alternately, the package will automatically add an addin to R Studio under Addins > KANDLETHEME > Toggle Plot Transparency which will just call the above function. Restarting R Studio may be necessary to make the addin appear in the list. I find particularly useful to bind the addin to a key to quickly change the plot's behavior. This can be done in Tools > Addins > Browse addins > Keyboard shortcuts and just filling in the field for Toggle Plot Transparency with whatever shortcut you prefer.

Just the themes

The on/off of the bright-on-hover plot area is obtained by simply switching between two identical themes, one in which the plot is always bright, one in which the switching is allowed.

If you wish to install the themes only (.rstheme files), run this for the always-bright plot:

rstudioapi::addTheme("https://raw.githubusercontent.com/TheMrKingent/KandleTheme/master/inst/themes/Kandle.rstheme", apply = TRUE)

or this for the bright-on-hover one:

rstudioapi::addTheme("https://raw.githubusercontent.com/TheMrKingent/KandleTheme/master/inst/themes/KandleDarkerPlot.rstheme", apply = TRUE)