是否有可在 Sublime Text 2 中使用的键盘快捷键的完整列表?
我专门寻找可以让我使用箭头键、Home、Delete(不是Backspace)和End键功能的快捷方式,而无需将我的手移出主行...
答案1
我应该在问这个问题之前多挖点东西……它们被称为“按键绑定”,每一个都可以在文本文件中配置。单击“首选项”>“默认按键绑定”即可查看它们。将您想要编辑的按键绑定复制并粘贴到“首选项”>“用户按键绑定”中,然后根据自己的喜好进行更改。
这是文档。
我的问题是我搜索的是“键盘快捷键”而不是“键绑定”。哎呀...
为了专门解决我的问题,关于如何复制 Delete、Home、End 和 Arrow 键,我修改了“用户键绑定”文件,使其如下所示:
[
{ "keys": ["shift+backspace"], "command": "right_delete" },
{ "keys": ["ctrl+backspace"], "command": "right_delete" },
{ "keys": ["ctrl+j"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["ctrl+l"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["ctrl+i"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["ctrl+k"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["ctrl+shift+j"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true} },
{ "keys": ["ctrl+shift+l"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true} },
{ "keys": ["ctrl+shift+i"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true} },
{ "keys": ["ctrl+shift+k"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true} },
{ "keys": ["ctrl+alt+j"], "command": "move", "args": {"by": "words", "forward": false} },
{ "keys": ["ctrl+alt+l"], "command": "move", "args": {"by": "word_ends", "forward": true} },
{ "keys": ["ctrl+shift+alt+j"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} },
{ "keys": ["ctrl+shift+alt+l"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} },
{ "keys": ["ctrl+,"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["ctrl+."], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["ctrl+shift+,"], "command": "move_to", "args": {"to": "bol", "extend": true} },
{ "keys": ["ctrl+shift+."], "command": "move_to", "args": {"to": "eol", "extend": true} }
]
答案2
答案3
你可能没有听说过,但有一个应用程序可以显示你 Mac 上任何应用程序的所有快捷方式(包括 Sublime Text 2)。你可以在以下网址找到它: http://www.grandtotal.biz/CheatSheet/
标准用法:只需在应用程序运行时按住命令按钮即可。