Rstudio: Highlight function parameters + separate styling for operators

Created on 25 Jun 2019  路  3Comments  路  Source: rstudio/rstudio

I found that this has been requested a while ago here: https://support.rstudio.com/hc/en-us/community/posts/211643088-syntax-highlighting-for-known-function-names-parameter-names
But I couldn't find any news about adding possibility to add highlighting of parameters.

A second suggestion is to allow separate styling option for (), <-, %>%, =, etc.

enhancement themes

Most helpful comment

Thank you .ace_keyword.ace_operator.ace_paren already helped.

It's great that you already thought about the parameter styling. I think everybody would benefit if we could improve the readability of R code as it is in Sublime.

Screen Shot 2019-06-26 at 12 52 03

All 3 comments

@Mashin6 Thank you for the suggestion. We'll review this as we continue development of RStudio.

It's possible to create custom themes, uploaded using Tools -> Global Options -> Appearance -> Add. However, @MariaSemple鈥攊s it possible to make themes that have different styling for parameters and each operator?

It is possible to do some custom styling for operators. Unfortunately, it is not currently possible to have separate styling for parameters. We are tracking this enhancement request here: https://github.com/rstudio/rstudio/issues/3717.

To apply a style for all operators, you can use the CSS selector .ace_keyword.ace_operator. To apply a style for (), {}, and [], you can use the CSS selector .ace_keyword.ace_operator.ace_paren. To apply a style for custom user operators (anything within %%, including %>% and %/%), you can use the CSS selector .ace_keyword.ace_operator.ace_infix.

Thank you .ace_keyword.ace_operator.ace_paren already helped.

It's great that you already thought about the parameter styling. I think everybody would benefit if we could improve the readability of R code as it is in Sublime.

Screen Shot 2019-06-26 at 12 52 03

Was this page helpful?
0 / 5 - 0 ratings