比如:在"( )"内输入完成后,怎样让光标跳到括号外?
正常的做法是用方向键控制,但是感觉方向键太麻烦 于是各种百度 各种谷歌 终于找到了一个办法
[html] view plain copy - [
- {"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 }
- ]
- }
- ]
保存到“按键绑定-用户“里
然后你在编辑器敲() 然后在括号内敲回车键是不是发现有什么不一样? 是不是发现光标自动跳到括号外了。
文章参考https:///topics/4824
|