I am a very visual person and would like a distinction between #a command I commented out
and a ##message for myself or co-worker on the file
. I had a look around if RStudio supports different kinds of comments but it doesn't seem like it. Does anyone know a way around this?
Thanks!
In RStudio under tools -> Options -> Appearance you can change the color of your R console and also change the fonts.
If you go to Tools > Global Options > Appearance, you can choose different themes, which can effect how RStudio highlight pieces of code.
You can use
#'* some colorfull comment *
to comment in color.
-R version 3.6.3 -RStudio ‘1.2.5033 "Orange Blossom"
As noted, this isn't an R question but an RStudio question (I've edited as such). RStudio doesn't currently have user-modifiable themes, just the built-in ones. That is apparently an in-development feature.
In the meantime, apparently you can hack away at the .css
file that defines a theme to perhaps add what you're after - https://support.rstudio.com/hc/en-us/community/posts/200644098-appearance-Editor-theme
Otherwise, you could use a different editor that allows you to specify your desired syntax highlighting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With