code_theme_list | R Documentation |
code_theme_list()
lists the built-in code themes.
code_theme_list()
Character vector of the built-in code theme names.
A theme is a list of character vectors, except for bracket
, see below.
Each character vector must contain RGB colors (e.g. "#a9a9a9"
),
and cli styles, e.g. "bold"
. Entries in the list:
reserved
: reserved words
number
: numeric literals
null
: the NULL
constant
operator
: operators, including assignment
call
: function calls
string
: character literals
comment
: comments
bracket
: brackets: (){}[]
This is a list of character vectors,
to create "rainbow" brackets. It is recycled for deeply nested lists.
In RStudio, it matches the current theme of the IDE.
You can use three options to customize the code theme:
If cli.code_theme
is set, it is used.
Otherwise if R is running in RStudio and cli.code_theme_rstudio
is
set, then it is used.
Otherwise if T is not running in RStudio and cli.code_theme_terminal
is set, then it is used.
You can set these options to the name of a built-in theme, or to list
that specifies a custom theme. See code_theme_list()
for the list
of the built-in themes.
Other syntax highlighting:
code_highlight()
code_theme_list()
code_highlight(deparse(get), code_theme = "Solarized Dark")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.