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

旧城冷巷雨未停 提交于 2020-01-13 09:54:25

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/18532440/in-sublime-text-3-can-i-send-a-selection-of-a-do-file-to-stata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!