Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to color code matching parentheses in R studio?

Everything I am finding online discusses highlighting matching parentheses, but I'm wondering if there is a specific editor theme or perhaps something else I could use for R studio that will color code matching parentheses within nested parentheses. New R user here. Thank you in advance.

like image 811
ENIAC-6 Avatar asked Nov 27 '15 02:11

ENIAC-6


People also ask

How do you make a rainbow parenthesis in R?

Enabling Rainbow Parentheses Open Global Options from the Tools menu. Select Code -> Display. Enable the Rainbow Parentheses option at the bottom.


1 Answers

There is an option to do this in RStudio however it only last the length of a click.

Given this simple code:

for (x in 1:10){
  print("Line 1")
  print("line 2")
}

If you double click right after any sign that requires a closing sing such as

()
{}

Then the code on the parenthesis will be highlighted. Example see what's inside the first parenthesis Code example 1

Or see the content of the for loop

Code example 2

like image 94
jalazbe Avatar answered Sep 28 '22 02:09

jalazbe