This SO question led me to try Sublime Text 3 as a replacement for Stata's do file editor on Linux (full instructions here).
这个问题导致我尝试使用Sublime Text 3替代Linux上的Stata do文件编辑器(这里有完整说明)。
Syntax highlighting works and a Ctrl+B
shortcut sends the whole do file to Stata.
语法高亮显示工作,Ctrl + B快捷方式将整个do文件发送到Stata。
Is there a way to send only a selection of lines to Stata?
有没有办法只向Stata发送一系列线路?
1 个解决方案
#1
2
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.
是的你可以。首先,您需要找到执行此操作的python函数的名称。对于SublimeStata Enhanced包,它对应于文件text_2_stata.py中的函数text_2_stataCommand。
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).
其次,您需要在Key Binding用户文件中添加此函数的快捷方式,您可以在命令字段中放置函数名称(必须删除后缀Command,并且用下划线而不是大写字母表示分隔)。
{ "keys": ["super+shift+b"],
"command":"text_2_stata",
"context": [
{"key": "selector", "operator": "equal", "operand": "source.stata"},]
},
#1
2
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.
是的你可以。首先,您需要找到执行此操作的python函数的名称。对于SublimeStata Enhanced包,它对应于文件text_2_stata.py中的函数text_2_stataCommand。
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).
其次,您需要在Key Binding用户文件中添加此函数的快捷方式,您可以在命令字段中放置函数名称(必须删除后缀Command,并且用下划线而不是大写字母表示分隔)。
{ "keys": ["super+shift+b"],
"command":"text_2_stata",
"context": [
{"key": "selector", "operator": "equal", "operand": "source.stata"},]
},