prettycode

Syntax highlight R code in the terminal

101
9
R

prettycode

Pretty Print R Code in the Terminal

R-CMD-check

CRAN RStudio mirror downloads
Codecov test coverage

Replace the standard print method for functions with one that performs
syntax highlighting, using ANSI colors, if the terminal supports them.

Installation

Stable version:

install.packages("prettycode")

Development version:

pak::pak("r-lib/prettycode")

Usage

Just call prettycode::prettycode() and start printing functions to the
screen. Long functions are automatically paged using the default pager.

Options

  • prettycode.should_page controls paging. Use FALSE to disable paging for long functions.

License

MIT © Gábor Csárdi