use_rstudio_prefs: Set RStudio Preferences

View source: R/use_rstudio_prefs.R

use_rstudio_prefsR Documentation

Set RStudio Preferences

Description

Updates RStudio preferences in rstudio-prefs.json.

Usage

use_rstudio_prefs(...)

Arguments

...

a series of RStudio preferences to update, e.g. ⁠always_save_history = FALSE, rainbow_parentheses = TRUE⁠

Details

Preference names, types, and allowed string values are validated against the official RStudio preference definitions before applying changes. A full listing of preferences is available in the RStudio documentation.

Value

Invisibly returns the updated preferences as a named list on success, or NULL if no updates were made (no changes, user aborted, or not in an interactive session).

Author(s)

Daniel D. Sjoberg (2021-2022)

S.A. van der Wulp (since 2026)

Examples


# Pass preferences individually
use_rstudio_prefs(
  always_save_history = FALSE,
  rainbow_parentheses = TRUE
)

# Pass a list of preferences
pref_list <-
  list(always_save_history = FALSE,
       rainbow_parentheses = TRUE)

use_rstudio_prefs(!!!pref_list)

# Pass array type preference
use_rstudio_prefs(
  busy_exclusion_list = list("tmux", "screen")
)


rstudio.prefs documentation built on Sept. 26, 2026, 5:06 p.m.