SendCode icon indicating copy to clipboard operation
SendCode copied to clipboard

set working directory automatically

Open catarinawor opened this issue 5 years ago • 3 comments

I am using sublime on windows and I am wondering if there is a way of setting the R directory to the file path when sending code. I'm trying to avoid starting my R code with setwd("really/long/and/unique/path/")

this issue is relate to this old R-box issue: https://github.com/randy3k/R-Box/issues/54 But I could not figure out how to translate the proposed solution to the current SendCode/R-box

Any help would be appreciated!

catarinawor avatar Aug 22 '18 21:08 catarinawor

Did you consider these keybinds? https://github.com/randy3k/SendCode#custom-keybindings

randy3k avatar Aug 22 '18 21:08 randy3k

The keybind did work! So sorry I did not see it before. I still have to run the keybind every time I open a new project, but at least I do not have to hardwire the path in. Thanks again!

catarinawor avatar Aug 22 '18 21:08 catarinawor

The ability of setting the path autoamatically depends on the program which you are using. Some program simply cannot set it while others may have potential tricks.

randy3k avatar Aug 22 '18 21:08 randy3k