make_path_norm {rstudio.prefs}R Documentation

Normalize Path Add-in

Description

Wrapper to execute fs::path_norm() as a shortcut on highlighted text. The updated text will be converted in place to a path normalized for the environment currently in use. For instance, \ or \\ will be converted to / on Windows machines. See below for process of setting shortcut.

Usage

make_path_norm()

Details

Add keyboard shortcut for make_path_norm() in RStudio, use the use_rstudio_keyboard_shortcut() function. Do add it manually, follow the instructions below.

Value

normalized path string

See Also

fs::path_norm

Examples

if (interactive()) {
  # set a keyboard shortcut for path normalization
  rstudio.prefs::use_rstudio_keyboard_shortcut(
    "Ctrl+Shift+/" = "rstudio.prefs::make_path_norm"
  )
}

[Package rstudio.prefs version 0.1.9 Index]