在Sublime Text 3中,我可以将选择的do文件发送到Stata吗? [英] In Sublime Text 3, can I send a selection of a do file to Stata?

查看:144
本文介绍了在Sublime Text 3中,我可以将选择的do文件发送到Stata吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题使我尝试使用Sublime Text 3替代Linux上Stata的do文件编辑器(完整说明此处).

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

语法突出显示有效,并且Ctrl+B快捷方式将整个do文件发送到Stata.

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

是否可以仅向Stata发送一些行?

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

推荐答案

可以. 首先,您需要找到执行此操作的python函数的名称.对于 SublimeStata增强包,它对应于文件text_2_stata.py中的函数text_2_stataCommand.

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.

第二,您需要在键绑定"用户文件中为此功能添加一个快捷方式,在该文件中,您将功能名称放在命令字段中(必须删除后缀Command,并且分隔符由下划线而不是大写字母表示).

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"},]
},

这篇关于在Sublime Text 3中,我可以将选择的do文件发送到Stata吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆