r – Is there an Rstudio shortcut key for “?

I use it a lot on Rmarkdow for referring to code, so I created an Addin, but wanted to know if there’s a shortcut. If it isn’t the case, how could I do to configure the addin so when calling it, the position of the caret or cursor stands between both symbols, exactly as it happens when using "" or () in RStudio.

insertInAddin <- function() { rstudioapi::insertText("``") } is the code I used for the Add-in

I’m looking help understanding how to setup

rstudioapi::setCursorPosition()
and document_position() inside the location argument of insertText.

Read more here: Source link