gadenbuie / shrtcts

Make Anything an RStudio Shortcut
https://pkg.garrickadenbuie.com/shrtcts/
Other
119 stars 4 forks source link

Location of keybinding files changed in RStudio 1.4.845 #11

Closed gorkang closed 4 years ago

gorkang commented 4 years ago

I updated RStudio this morning to the daily build (1.4.845) and {shrtcts} stopped working.

Running shrtcts::add_rstudio_shortcuts(set_keyboard_shortcuts = TRUE) gives the error: Error: Could not find addins.json in the usual places. You may need to manually create a new keyboard shortcut (use RStudio's Tools menu) first.

Digging a bit, it seems that in RStudio 1.4.845 the location of the keybinding files might have changed (https://support.rstudio.com/hc/en-us/articles/206382178?version=1.4.845&mode=desktop). As far as I can see they are now located in:

    ~/.R/rstudio/keybindings/rstudio_commands.json
    ~/.R/rstudio/keybindings/editor_commands.json

So, I guess the try_dirs variable in the path_addins_json() function, would need to include: fs::path_home(".R", "rstudio", "keybindings")

Thanks for the awesome package.

gadenbuie commented 4 years ago

What version of RStudio did up upgrade from? Was it another version of 1.4 or was it a previous version, like 1.3?

The addins shortcuts are still stored in addins.json, my guess is that if you follow the error instructions and open the shortcuts menu (and maybe add an addin shortcut if needed), the addins.json file will be created or migrated into place.

gorkang commented 4 years ago

I upgraded from another daily, and it seems for some time my system was a bit iffy... All is working OK again. Sorry for the noise.

gadenbuie commented 4 years ago

No worries, glad it's working!