Install Stata Linux



Browse

Sublime Text 3 plugin that adds support for Stata (all versions) in Linux.

Stata for Linux includes software and PDF documentation, which includes access to all the manuals. Stata for Linux comes in three editions: Stata/MP, Stata/SE, and Stata/IC. There are two ways to install this plugin: Search for “StataLinux” on Package Control, or; Copy/clone the entire plugin folder (this repository) to /.config/sublime-text-3/Packages/. Make sure you have installed the dependencies listed above before using it. Make sure you have one instance of Stata open.

Details

Installs

  • Total108
  • Win0
  • Mac0
  • Linux108
Dec 8Dec 7Dec 6Dec 5Dec 4Dec 3Dec 2Dec 1Nov 30Nov 29Nov 28Nov 27Nov 26Nov 25Nov 24Nov 23Nov 22Nov 21Nov 20Nov 19Nov 18Nov 17Nov 16Nov 15Nov 14Nov 13Nov 12Nov 11Nov 10Nov 9Nov 8Nov 7Nov 6Nov 5Nov 4Nov 3Nov 2Nov 1Oct 31Oct 30Oct 29Oct 28Oct 27Oct 26Oct 25
Windows000000000000000000000000000000000000000000000
Mac000000000000000000000000000000000000000000000
Linux000000100000000001100000120010001210000100000

Readme

Source
raw.​githubusercontent.​com

Sublime Text 3 plugin that adds basic support for Stata (all versions) in Linux.

Stata install package
  • Language definitions for do and ado files
  • Commands for sending a selection of lines or the whole file to Stata.See usage for more details.
Install stata linux

Background

I needed a minimal yet robust plugin for sending code from Sublime Text into Stata.Since none of the plugins in the Package Control was specifically tailored for Linux, and none of the maintainers seem to want to add Linux support to theirs, I wrote my own.This plugin is originally based on StataEnhanced, and also on these notes.

Install Stata Linux Software

This plugin aims for robustness over bells and whistles, and almost all the decisions were taken with that philosophy in mind.It basically creates a temporary file which is to be executed in Stata.The file is sent for execution by copying do <filepath> to the clipboard with xclip, and then pasting this string directly (and in the background) to Stata's command pane using xdotool.

Dependencies

  • xdotool
  • xclip

These packages are likely already in your system.You can check their presence by typing each name with the --version option in your terminal.For example,

If the output is something like xdotool version 3.20160805.1, then it's installed.If you get an error, then the package is not installed.Use your system's package manager to install them.For example,

Arch(-based)

Stata Install Ado

Ubuntu(-based)

etc.

Installation

There are two ways to install this plugin:

  1. Search for “StataLinux” on Package Control, or
  2. Copy/clone the entire plugin folder (this repository) to ~/.config/sublime-text-3/Packages/.

Make sure you have installed the dependencies listed above before using it.

Usage

Make sure you have one instance of Stata open.Open a .do (or .ado) file in ST3.You have two keybindings for executing code:

  1. ctrl+alt+d executes the current line, or the selected lines if a selection is made, and
  2. crtl+alt+shift+d executes the entire file.

These actions may also be called using the Command Palette: after invoking it with ctrl+shit+p, type “StataLinux” and select an action.Additionally, these actions are accessible in the main menu under Tools > Packages > StataLinux.

Note that if a line is only partially selected, the program will automatically select the whole line for execution.Also, when sending the whole file for execution, StataLinux will default to saving the current file first.This option can be disabled in the settings.

Other features

Comments

Stata Install Estout

Comment toggling for entire lines works with the default ST3 keybinding, ctrl+.Arbitary blocks can be commented out with ctrl+shift+.

Locals

Install Stata 16 Linux

Typing a backtick ` anywhere in the code will immediately put a closing tick after it, with the cursor inside.Typing a backtick with a word selected will yield `word'.

Stata versions, flavors and instances

Stata Ubuntu

Make sure you have an instance of Stata with GUI open (xstata, or its various flavors); this plugin doesn't work with Stata's CLI.No additional configuration needs to be added to indicate version or flavor, since the program will detect any running instance automatically.If you have more than one instance of Stata open, the plugin will default to choosing the most recently opened one (internally, it looks for the last entry of xdotool search --classname 'stata').

Known issues

  1. Currently, there is an issue with xdotool's clearmodifiers option.This has the consequence that the plugin will fail to operate correctly if any keyboard modifiers (e.g. Caps Lock) are not manually turned off.Now not an issue, since I'm using xdotool with the --window, which seems cleaner than focusing and refocusing windows, and has the added bonus of disregarding any active modifiers.

  2. There is currently no option for switching focus to the Stata window.This is because there are good reasons to use xdotool with the --window option (see issue #1), so I don't plan on implementing this.Window focus is a task for window managers, anyway.