Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Sublime Text 3, can I send a selection of a do file to Stata?

This SO question led me to try Sublime Text 3 as a replacement for Stata's do file editor on Linux (full instructions here).

Syntax highlighting works and a Ctrl+B shortcut sends the whole do file to Stata.

Is there a way to send only a selection of lines to Stata?

like image 502
radek Avatar asked Aug 23 '13 20:08

radek


1 Answers

Yes you can. First you need to find the name of the python function that does it. For the SublimeStata Enhanced package , it corresponds to the function text_2_stataCommand in the file text_2_stata.py.

Second, you need to add a shortcut for this function in the Key Binding user file, where you put the function name in the command field (the suffix Command must be removed and separations are indicated by underscores instead of capital letters).

{ "keys": ["super+shift+b"],
"command":"text_2_stata",
"context": [
{"key": "selector", "operator": "equal", "operand": "source.stata"},]
},
like image 58
Matthew Avatar answered Oct 26 '22 12:10

Matthew