首页 > 代码库 > SUBLIME TEXT 2中,光标移入移出括号的快捷键设置

SUBLIME TEXT 2中,光标移入移出括号的快捷键设置

无赖右方向键→和End键都在键盘的另一边,每次输入完一个函数,光标在各种括号中间,有什么更好的方式将光标移出来呢?

在Sublime Text 2中,我们可以自己设置快捷键:

{ "keys": ["ctrl+alt+space"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["shift+space"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["alt+space"], "command": "move", "args": {"by": "word_ends", "forward": true} },
{ "keys": ["shift+alt+space"], "command": "move", "args": {"by": "word_ends", "forward": false} },
{ "keys": ["alt+enter"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["shift+alt+enter"], "command": "move", "args": {"by": "lines", "forward": false} }

快捷键对照:
ctrl+alt+space 右移光标一个字
shift+space 左移光标一个字
alt+space 右移光标一个单元
shift+alt+space 左移光标一个单元
alt+enter 下移光标一行
shift+alt+enter 上移光标一行

shift+回车就完全当做老蔡的买一赠一了,作用跟ctrl+回车不太一样的地方是,不新建一行。

原文出处:http://www.oldcai.com/archives/788