Open gadenbuie opened 3 years ago
In cases where the goal of the shortcut is to add an option to insert text. This is possible with a wrapper around rstudioapi functions, but requires a bit of boilerplate.
#' Insert New Pipe shrtcts::insert_text(" |> ", where = "activeDocument")
https://rstudio.github.io/rstudioapi/reference/rstudio-editors.html
Would also be nice to check (or add option to check) for spaces around the text, e.g. to add whitespace before and after if not already present.
In cases where the goal of the shortcut is to add an option to insert text. This is possible with a wrapper around rstudioapi functions, but requires a bit of boilerplate.
https://rstudio.github.io/rstudioapi/reference/rstudio-editors.html