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

Feature: use_rstudio_keyboard_shorcuts() #2094

Open
DanChaltiel opened this issue Jan 22, 2025 · 2 comments
Open

Feature: use_rstudio_keyboard_shorcuts() #2094

DanChaltiel opened this issue Jan 22, 2025 · 2 comments
Labels
feature a feature request or enhancement

Comments

@DanChaltiel
Copy link

Hi,

I use usethis a lot when I'm setting RStudio on a new computer, especially with use_rstudio_preferences() which saves a lot of time.

RStudio also provides a way to save and load Keyboard Shortcuts, but remembering the path is difficult and system dependant.

It would be far more convenient if there was a function that could do it for ourselves, either like use_rstudio_preferences() or like edit_rstudio_prefs().

Would you consider implementing this in usethis?

@jennybc
Copy link
Member

jennybc commented Jan 31, 2025

I'm ambivalent about adding such a function, because it feels weird to me to edit this JSON file "by hand" as it were. But it is sort of comparable to use_rstudio_preferences(), so I won't necessarily close this.

Sidebar: In case it's interesting to you in the meantime, the way I handle all of this is to give these sort of RStudio config files my "full dotfile treatment". I keep all my dotfiles in a git repo and symlink them into the right locations. So here's how ~/.config is actually set up for me:

 .config -> /Users/jenny/resources/system-setup/dotfiles/.config

and then rstudio directory within that .config directory looks like so:

~/.config % tree rstudio
rstudio
├── crash-handler.conf
├── dictionaries
│   └── custom
├── keybindings
│   ├── addins.json
│   ├── editor_bindings.json
│   └── rstudio_bindings.json
├── rstudio-prefs.json
└── snippets
    └── r.snippets

When I set up a new computer, all my dotfiles just come over with my main file migration and then I place a few symlinks to put them all back into force.

@jennybc jennybc added the feature a feature request or enhancement label Jan 31, 2025
@DanChaltiel
Copy link
Author

Thank you so much for this workaround Jenny, this is a very interesting setup.
Unfortunately, I have to use Windows so symlinking is not easy to set up, but maybe I can save/read these in a portable archive.

I'm curious though, why does it feel weird to you to edit rstudio_bindings.json but not rstudio-prefs.json?

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

No branches or pull requests

2 participants