default_style: Default 'prettycode' syntax highlighting style

Description Usage Details Examples

View source: R/style.R

Description

A style function must return a named list of functions. Possible entries:

Usage

1

Details

Each entry in a list must be a function that takes a character scalar, and returns a character scalar with the exception of bracket which should be a list of functions defining a color sequence. The default style adds ANSI formatting to the code.

Note that you can also change the code if you like, e.g. to include a unicode arrow character instead of the two-character assignment operator.

Examples

1

Example output

Attaching package: 'prettycode'

The following object is masked from 'package:base':

    print.function

[1] "function (x, pos = -1L, envir = as.environment(pos), mode = \"any\", "
[2] "    inherits = TRUE) "                                                
[3] ".Internal(get(x, envir, mode, inherits))"                             

prettycode documentation built on Dec. 16, 2019, 5:42 p.m.