简体   繁体   English

在Sublime Text 3中,我可以将选择的do文件发送到Stata吗?

[英]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.

相关问题 在 Sublime Text 中,如何查找和替换文件名 - In Sublime Text, how do I find and replace the file name 如何使用Elementary OS Luna授予文件Preferences.sublime-settings的写许可权并找到Sublime Text 3的此文件? - How I can grant write permission to the file Preferences.sublime-settings and locate this file of Sublime Text 3 using Elementary OS Luna? 如何正确配置Sublime Text 3作为git commit消息的默认文本编辑器? - How do I properly configure Sublime Text 3 as the default text editor for git commit messages? 如何让Sublime Text 2包管理器使用我的代理? - How do I get Sublime Text 2 package manager to use my proxy? 如何防止Sublime Text更改文件的权限? - How to prevent Sublime Text to change the rights on a file? 如何通过蓝牙将Android应用程序连接到Raspberry Pi,以发送数字文本文件? - How can I connect an Android app to Raspberry Pi, via Bluetooth, in order to send a text file of numbers? 如何从linux中的命令行打开Sublime Text 2文件到选项卡,而不是新窗口 - How can I open Sublime Text 2 files from the command line in linux to a tab, not a new window vim:发送文本选择到bash - vim: send text-selection to bash 崇高-仅将选择范围扩展到匹配项 - Sublime - expand selection only to matches 如何将文本附加到文件? - How do I append text to a file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM