Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r-lib/prettycode
Syntax highlight R code in the terminal
https://github.com/r-lib/prettycode
r
Last synced: 6 days ago
JSON representation
Syntax highlight R code in the terminal
- Host: GitHub
- URL: https://github.com/r-lib/prettycode
- Owner: r-lib
- License: other
- Created: 2016-11-15T13:30:58.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2024-10-05T14:59:14.000Z (4 months ago)
- Last Synced: 2025-01-12T23:04:34.689Z (13 days ago)
- Topics: r
- Language: R
- Homepage: https://r-lib.github.io/prettycode/
- Size: 1.38 MB
- Stars: 101
- Watchers: 7
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - r-lib/prettycode - Syntax highlight R code in the terminal (R)
README
# prettycode
> Pretty Print R Code in the Terminal
[![R-CMD-check](https://github.com/r-lib/prettycode/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/prettycode/actions/workflows/R-CMD-check.yaml)
[![](https://www.r-pkg.org/badges/version/prettycode)](https://www.r-pkg.org/pkg/prettycode)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/prettycode)](https://www.r-pkg.org/pkg/prettycode)
[![Codecov test coverage](https://codecov.io/gh/r-lib/prettycode/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/prettycode?branch=main)Replace the standard print method for functions with one that performs
syntax highlighting, using ANSI colors, if the terminal supports them.## Installation
Stable version:
```r
install.packages("prettycode")
```Development version:
```r
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.![](/screenshot.png)
### Options
- `prettycode.should_page` controls paging. Use `FALSE` to disable paging for long functions.
## License
MIT © Gábor Csárdi