I am wondering if there is a way to customize RStudio keyboard shortcuts (i.e., the ones you see in RStudio by default when you type Alt + Shift + k) in an .RProfile. I know you can do this manually by going to "Tools --> Modify Keyboard Shortcuts" in the IDE, but I am looking to do this automatically upon startup.
If it helps, here is an analogy. To change your choice of CRAN mirror, you can go to "Tools --> Global Options --> Packages" and change the mirror manually. However, you can also do this in a .RProfile script as follows:
local({
r <- getOption("repos")
r["CRAN"] <- "https://cran.rstudio.com/"
options(repos=r)
})
I have not yet seen an online resource that addresses my question, so I thought I would ask it here. I know my choice of keyboard shortcuts would be preserved from one R session to another, but I am looking to be as efficient as possible (e.g., maybe I end up switching computers in the future - I could just run my .RProfile on a new machine with my preferred keyboard combinations instead of having to manually change them all again).