Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated insertAtAddin function in addinexamples? #10

Open
moldach opened this issue Aug 8, 2018 · 1 comment
Open

deprecated insertAtAddin function in addinexamples? #10

moldach opened this issue Aug 8, 2018 · 1 comment

Comments

@moldach
Copy link

moldach commented Aug 8, 2018

In the past I could add my own shortcuts with the addinexamples package by doing the following; however, I'm getting an error now at the last step:

install.packages("rstudioapi", type = "source")
devtools::install_github("rstudio/addinexamples", type = "source")
library(rstudioapi)
library(addinexamples)

Now search for the addins.dcf file in your R directory and open it in a text editor.

Copy the first block to the bottom but replace %in% with %>% and the binding to insertAtAddin

Next quit R and then reload, now type:

insertAtAddin <- function(){rstudioapi::insertText(" %>% ")}

Now go to Addins on the toolbar and click Browser Addins then to shortcuts, now double-click function then type:

Shift + Ctrl + S

However, I'm not seeing the "Browser Addins' anymore on the Addins toolbar and when I try to click "Insert %>%I get an error saying that there is no functioninsertAtAddinin theaddinexamples` package.

Am I doing something wrong or has that function been removed? It was really helpful to set a two-stroke hotkey for the pipe operator (and many others!) rather than using Shift + Ctrl + M

@IsadoraBM
Copy link

Related:

I've tried adding a insertCompoundAddin function and binding it but I can't find the insertInAddin.R file, so I cannot add or duplicate and modify the file to add the following function

insertCompoundAddin <- function() {
rstudioapi::insertText(" %<>% ")
}

Is it possible for you to add it to the list?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants