-
Notifications
You must be signed in to change notification settings - Fork 27
set working directory automatically #54
Comments
This is something I've wanted as well. I have a fork that does something like this. It sets the working directory to the project directory every time you send a command. https://github.com/hafen/R-Box You can see the relevant changes in rbox/send_text.py at the bottom of here: The way you activate it is to set a project variable "R_box_setwd" to true. So your x.sublime-project file might look something like this:
This is pretty unobtrusive but I haven't gotten around to doing a PR for it. |
Not sure if I follow, but is what you are looking for different than |
First create a project in Sublime Text in a folder foo. In REPL R, thanks to the setting that I mentioned above, by default the current working directory (cdw) is set to the level of the folder foo. It makes Sublime Text work with projects in the same way as Studio does. @hafen code (that I confess I haven't tried yet but is on my todo list!) should be doing something similar for R terminal (i.e. when we send the code to the R UI): automagically the wd is set to the folder level. I have never used |
@smartinsightsfromdata The problem with CMD+\ is it uses the source files directory. I usually keep my project-template file in projectdir, in the below structure. in fact, is there a way to turn it off because I hit \ accidentally all the time. |
Sending code feature is exported to SendREPL. |
When I use SublimeREPL: R ("driven" by R-BOX of course), I manage to tell it to use the current folder as home folder. It saves a lot of confusion. The setting is
"cwd": "$folder",
.Sadly I haven't found how to do the same in RBox when using the R app (I'm using OS X).
Is it possible, and if yes, how?
The text was updated successfully, but these errors were encountered: