使用 17 楼的脚本会有一个问题,就是在括号中无法用 enter 来自动补全了,我稍微改了一下,这个样子就完美了:
[
{"keys": ["enter"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)\\]\\>\\'\\\"\\ %>\\}\\;\\,]", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": "^.*\\{$", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }
]
}
]