styler (version 1.1.0)

styler_addins: Stylers for RStudio Addins

Description

Helper functions for styling via RStudio Addins.

Usage

style_active_file()

style_selection()

Arguments

Functions

  • style_active_file: Styles the active file with tidyverse_style() and strict = TRUE.

  • style_selection: Styles the highlighted selection in a .R or .Rmd file.

Auto-Save Option

By default, both of the RStudio Addins will apply styling to the (selected) file contents without saving changes. Automatic saving can be enabled by setting the environment variable save_after_styling to TRUE.

Consider setting this in your .Rprofile file if you want to persist this setting across multiple sessions. Untitled files will always need to be saved manually after styling.

See Also

Sys.setenv()

Other stylers: style_dir, style_file, style_pkg, style_text