2

I recently migrated from Stata12 to Stata13 and want to keep using Sublime Text 2 for editing. I am using a Win7 System.

My Stata build file in Sublime Text 2 looks like this:

{
   "selector": "source.stata",
   "working_dir": "$file_path",
   "cmd": ["StataSE-64", "/qs", "do", "$file"]
}

Previously (i.e. in Stata12) this launched Stata, run the do File and then left the Stata Window open so I could work in the Stata Command line with whatever the do-file produced.

Since Stata13 however Stata is only started as a (inaccessible) process in the background, but the Stata window does not open.

I suppose it is a problem with Sublime since if I enter

StataSE-64 /qs do mydofile.do

directly in the windows cmd everything works as usual, Stata opens, runs the do file and remains open for further commands.

I also tried other options in the sublime build such as /b or /s, where Stata does, as expected save the output in logfiles.

Is there anyone who has an idea how I could launch Stata from sublime, run the do-file and then leave stata open and accessible for further commands?

johaschn
  • 123
  • 3

1 Answers1

2

Try adding "shell": true to your build system. This will run the build through cmd.exe and should replicate your command line execution. Alternatively, change "cmd" to the following:

"cmd": ["cmd.exe", "StataSE-64", "/qs" "do", "$file"]

This will do essentially the same thing, so try one or the other, as well as both together, and see if that fixes it.

MattDMo
  • 100,794
  • 21
  • 241
  • 231