[英]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 ). 这个问题使我尝试使用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?
Yes you can. 是的你可以。 First you need to find the name of the python function that does it. 首先,您需要找到执行此操作的python函数的名称。 For the SublimeStata Enhanced package , it corresponds to the function text_2_stataCommand in the file text_2_stata.py. 对于SublimeStata增强软件包 ,它对应于文件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). 其次,您需要在“键绑定”用户文件中添加此功能的快捷方式,在该文件中,您将功能名称放在命令字段中(必须删除后缀Command,并且分隔符用下划线而不是大写字母表示)。
{ "keys": ["super+shift+b"],
"command":"text_2_stata",
"context": [
{"key": "selector", "operator": "equal", "operand": "source.stata"},]
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.