Stata Enhanced
Plugin that adds support for Stata 11–15 for Sublime Text 2 and 3
Details
Installs
- Total 11K
- Win 6K
- Mac 5K
- Linux 1
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 3 | 2 | 1 | 0 | 1 | 1 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 3 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 2 | 2 | 0 | 0 | 1 | 2 | 0 |
Mac | 0 | 0 | 2 | 1 | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 2 | 0 | 0 | 0 | 1 | 0 | 2 | 1 | 1 | 0 | 1 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime Stata Enhanced
- Version 2.2.4
- Date: June 16, 2017
This package adds basic support for Stata (11–15, Windows and OS X) and comes with:
- Language definition for
.do
and.ado
files - Commands for sending individual lines or selections to Stata (available via the command palette and with keyboard shortcuts):
- (OS X) Send current line or selection to Stata:
super+enter
- (Windows) Send current line or selection to Stata:
ctrl+enter
- (OS X) Send current line or selection to Stata:
- A build system for Stata files
Background
This is a modified version of Steve Harris's Stata package. Because of scripting limitations in Stata < 12, his version relied on creating temporary .do
files to pass commands to Stata. Stata 13 added fancy new AppleScript commands (specifically DoCommand
and DoCommandAsync
) that allow for scripted commands and eliminate the need for temporary files. Because of that, this package is far simpler than other Sublime Text packages.
For compatability with previous versions of Stata, however, I have included commands that create temporary files, as in the original Stata package. As such, this package works with Stata 11 and above on both OS X and Windows.
Installation
There are two ways to install this package:
- Search for “Stata Enhanced” on Package Control
- Copy the entire plugin folder to
~/Library/Application Support/Sublime Text 2/Packages
or~/Library/Application Support/Sublime Text 3/Packages
Configuration options
OS X
- (Stata 11 and 12 only) This package sends selected code to a temporary file and then opens that file in Stata via Finder. In order for it to work correctly on your system, you must ensure two things are true:
.do
files must be set to open in Stata by default in Finder (right click on a.do
file > “Get Info” > “Open with” > “Change all…” > Select Stata..do
files opened in Stata need to be run, not edited. Change this in Preferences > Do-file Editor > Advanced > Edit do-files opened from the Finder in Do-file Editor (uncheck this)
By default, when sending code to Stata on OS X, Sublime Text will maintain focus so you can continue to edit, following the pattern of RStudio, which sends code to the R console from the script editor without changing focus away from the editor. If you prefer for Stata to take focus after sending lines or selections, set the switch_focus_to_stata
to true
in Stata Enhanced (OS X).sublime-settings
.
Windows
- (All versions of Stata) Set the full path of your Stata installation (with slashes reversed) in
Stata Enhanced (Windows).sublime-settings
(default is"C:/Program Files (x86)/Stata13/StataSE-64.exe"
) - This package sends selected code to a temporary file and then opens that file in Stata. In order for it to work correctly on your system, you must ensure that
.do
files opened in Stata are run, not edited. Change this in Do-file Editor > Edit > Preferences > Advanced > Edit do-files opened from Windows instead of executing them (uncheck this)
Roadmap and wish list
- Stata 13 for Windows has support for Automation APIs. It would be cool to use those instead of temporary files (like how the OS X version of the plugin uses temporary files for Stata 11–12, but the API for 13).