RStudio configuration files

Is there a way to expose the users configurations and customizations, which have been modified from the Tools > Global Options menu?

Similar to other programs' dotfiles, this could be called a .rstudio file. Could be shared among users or across multiple machine. Could be tracked in version control. Could be extended to provide support for packages like lintr.


I think you can version control the directories discussed here:

And possibly end up with something close. But the files there are far from being user friendly. And I have not monkeyed around with those at all. If you slam that into version control, I suspect any directory ending in *_cache should probably be excluded.

If you give it a go, report back with what you find. I'd be interested in hearing your experiences.


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

I'm looking for something similar as I try to get serious about sticking all my dotfiles in a git repo, and using @jdlong's link I dug through that directory in a fairly fresh RStudio install on my linux machine.

For my purposes I only want to version control config, not state, so many things in there like which R version I used last, which project I had open, etc. are not things I wish to add to git.

The meat is in ~/.rstudio-desktop/monitored/user-settings/user-settings (not a typo; file has same name as folder and no file extension); this seems to be everything you set through Global Settings. Just controlling this might be enough, though I can imagine many problematic future scenarios, like restoring the file from git to a new version of RStudio with different config options, setting font to something that doesn't exist on a new system (e.g. FiraCode), etc. Whatever, I'm versioning it, future me be damned!

There's also some interesting stuff in the ~/.rstudio-desktop/pcs/ directory, I see three *-pane.pper and a windowlayoutstate.pper. I think the -pane ones control which stuff you have in the 4 quadrants of the UI, and could be worth versioning, though I'd definitely skip the windowlayout state because it's very explicitly state.

Hope this helps! If nothing else it'll probably help me when I've forgotten this all in a month.