highlight: Line highlight plugin

View source: R/plugins.R

highlightR Documentation

Line highlight plugin

Description

Line highlight plugin

Usage

highlight(range)

Arguments

range

A character indicating the range to be used, for example 2-5 will highlight from 2 up to 5. Also you can highlight two or more ranges in the following way 2-5,10-13,19.

Value

A list (named) with the name of the plugin and the range passed by the function

Examples

if (interactive()) {
  highlighter::highlighter(
    "print('Hello, world!')\ncat <- \"Aristofanes\"\nstr(some_variable)",
    language = "r",
    plugins = list(
      highlight(
        range = "1-2"
      )
    )
  )
}


highlighter documentation built on Sept. 25, 2023, 5:08 p.m.