Need some help with locating and backing up Snippets

Hello. I am a new user to Rstudio Server. I mostly interact through the browser@localhost and I want to know where my snippets are physically stored on file system so i can back them up? I am using Ubuntu 16.04 LTS Desktop as my Operating System. Thank you.

1 Like

Does this help?

Excerpt:

Saving and Sharing Snippets

Once you’ve customized snippets for a given language they are written into the ~/.R/snippets directory. For example, the customized versions of R and C/C++ snippets are written to:

~/.R/snippets/r.snippets
~/.R/snippets/c_cpp.snippets

You can edit these files directly to customize snippet definitions or you can use the Edit Snippets dialog as described above. If you need to move custom snippet definitions to another system then simply place them in ~/.R/snippets and they’ll be used in preference to the built-in snippet definitions.

1 Like

This gives me a clue. Although ".R" folder does not exist(only .rstudio and the snippets folder is empty there), this will help me to configure the snippets so that they start saving and create that folder. Thanks.

Yeah, the support article does not make clear whether the location can vary at all for Server, and I am not somewhere I can test it myself right now. Have you actually modified any snippets yet? I think that’s a necessary precursor to having a local .snippets file exist.

2 Likes

I see. i am making some custom ones now and see if that will work.

This solved the mystery. it automatically created the .R folder and exported all the default snippets including my custom ones in a text/ascii file called "r.snippets". Thank you.

1 Like

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