Thanks to Timothy Beatty write and send to Stata my do files is now a child's play.

I recommend to everyone TextMate (30 days free trial), a very powerful (at least for me!) text editor for Mac I found better than others like, for instance, TextWrangler or Jedit (the latter available also for Windows). Once TextMate is installed, you have to download and install the Timothy Beatty's bundle. After unzipping, click on the bundle file. You should see the following TextMate response

Then, all you need is:

  1. to make sure that your Stata flavor (Stata/MP, Stata/SE, Stata/IC or Small Stata) matches what's in the the two "command" entries of the bundle (in green): Send file to Stata and Send selection to Stata (if the bundle editor disappears or you closed it by mistake, open TextMate and follow Bundles –> Bundle Editor –> Show Bundle Editor –> Stata),
  2. Since the bundle's command Send Selection to Stata creates every time a new do file called in the working directory, you can insert your preferred path to save it wherever you want. To do this, simply edit the following two lines by inserting your preferred path to



open POSIX file \”\”

For instance, my command's bundle is

... and that's it!!!

Print Friendly, PDF & Email