在使用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 }
]
}
本文介绍如何在Sublime编辑器中通过简单配置实现自动补全后的快速确认,提高编程效率。具体步骤包括:打开SublimeText,进入偏好设置的键盘绑定选项,添加特定的JSON配置来让Enter键在补全时直接确认并移动光标。
901

被折叠的 条评论
为什么被折叠?



