Create Add-In that applies the function to the selected text.

I want an Add-In to apply `` with a shortcut key for referencing code more quickly using Rmarkdown.

I already created the following shortcut by applying:

insertInAddin <- function() {
  rstudioapi::insertText("``")

But I want the Add-In to apply to the selected text, or make the cursor to position between the two automatically, when applying it, as it happens with ""

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.