Skip to content

Add edit_rstudio_prefs? #1148

Description

@boshek

Would an edit_rstudio_prefs function be useful here?

Here is a minimal function that might be a start cribbed heavily from edit_r_profile:

edit_rstudio_prefs <- function(){
  if( .Platform$OS.type == "windows") {
    path <- glue::glue("{Sys.getenv('APPDATA')}\\RStudio\\rstudio-prefs.json")
  }
  
  if( .Platform$OS.type == "unix") {
    path <- "~/.config/rstudio/rstudio-prefs.json"
  }
  
  usethis::edit_file(path)
  usethis::ui_todo("Restart RStudio for changes to take effect")
  invisible(path)
}

edit_rstudio_prefs()

Just trying to gauge whether there is interest in working on this to include into usethis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions