啥折腾一整,原来上边的设定完,已经可以使用了。原来里边有快捷方式设定,修改一下就可以了。我喜欢F9(和MATLAB一样).
[
{ "keys": ["f9"], "command": "stata_execute", "args": {"Mode": "do"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.stata" }
]
},
{ "keys": ["ctrl+r"], "command": "stata_execute", "args": {"Mode": "run"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.stata" }
]
},
{ "keys": ["alt+l"], "command": "stata_local", "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.stata" }
]
},
{ "keys": ["f1"], "command": "stata_help_internal", "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.stata" }
]
},
{ "keys": ["ctrl+f1"], "command": "stata_help_external", "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.stata" }
]
},
{ "keys": ["alt+shift+u"], "command": "stata_load", "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.stata" }
]
},
// Disable expansion ' -> ''
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.stata", "match_all": true }
]
},
// Disable expansion ' -> '...' when selected
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.stata", "match_all": true }
]
},
// Disable moving to right when in middle of ''
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.stata", "match_all": true }
]
},
// Disable deleting both '' when in middle and pressing backspace
{ "keys": ["backspace"], "command": "left_delete", "args": {}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.stata", "match_all": true }
]
},
// Stata `' quotes
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.stata", "match_all": true }
]
},
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.stata", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.stata", "match_all": true }
]
}
]
|