randy3k / SendCode

Send code and text to macOS and Linux Terminals, iTerm, ConEmu, Cmder, Tmux, Terminus; R (RStudio), Julia, IPython.
MIT License
204 stars 28 forks source link

set working directory automatically #98

Open catarinawor opened 6 years ago

catarinawor commented 6 years ago

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!

randy3k commented 6 years ago

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

catarinawor commented 6 years ago

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!

randy3k commented 6 years ago

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.