您的位置:首页 > 其它

Sublime自动补齐括号后如何快速跳出

2017-12-20 12:01 453 查看
在使用Sublime编辑器时,有自动补齐功能,补齐后要跳出常用的做法是去移动光标,这样操作比较麻烦,效率也慢,如下提供一种方式,稍做配置,可以实现补齐输入后,直接按Enter回车键快速跳出。

打开Sublime Text;

菜单栏 –>Preferences –> Key Bindings;

打开后,key-map-User中的中括号里边,输入如下文本,保存。

{"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 }
]
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: