grk_reindent: Re-indent R code using tabs or spaces

grk_reindentR Documentation

Re-indent R code using tabs or spaces

Description

Quickly convert from spaces to tabs or from tabs to spaces in R code throught a file, directory or package.

Usage

grk_reindent_auto_text(text, ...)

grk_reindent_auto_file(path, ...)

grk_reindent_auto_dir(path, ...)

grk_reindent_auto_pkg(pkg = ".", ...)

grk_reindent_tabs_text(text, ...)

grk_reindent_tabs_file(path, ...)

grk_reindent_tabs_dir(path, ...)

grk_reindent_tabs_pkg(pkg = ".", ...)

grk_reindent_spaces_text(text, ..., indent_by = 2L)

grk_reindent_spaces_file(path, ..., indent_by = 2L)

grk_reindent_spaces_dir(path, ..., indent_by = 2L)

grk_reindent_spaces_pkg(pkg = ".", ..., indent_by = 2L)

Arguments

text

A character vector with text to style.

...

Arguments passed on to the style function.

path

A character vector with paths to files to style.

pkg

Path to a (subdirectory of an) R package.

indent_by

The number of spaces by which to indent the code.

Functions

  • grk_reindent_auto_text: Re-indent text using tabs or spaces according to the RStudio project settings or the grkstyle.use_tabs option.

  • grk_reindent_auto_file: Re-indent a file using tabs or spaces according to the RStudio project settings or the grkstyle.use_tabs option.

  • grk_reindent_auto_dir: Re-indent a directory using tabs or spaces according to the RStudio project settings or the grkstyle.use_tabs option.

  • grk_reindent_auto_pkg: Re-indent a package using tabs or spaces according to the RStudio project settings or the grkstyle.use_tabs option.

  • grk_reindent_tabs_text: Re-indent text using tabs

  • grk_reindent_tabs_file: Re-indent a file using tabs

  • grk_reindent_tabs_dir: Re-indent a directory using tabs

  • grk_reindent_tabs_pkg: Re-indent a package using tabs

  • grk_reindent_spaces_text: Re-indent text using spaces

  • grk_reindent_spaces_file: Re-indent a file using spaces

  • grk_reindent_spaces_dir: Re-indent a directory using spaces

  • grk_reindent_spaces_pkg: Re-indent a package using spaces


gadenbuie/grkstyle documentation built on Oct. 25, 2023, 4:53 p.m.