添加;到行尾+下一行Sublime Text键绑定

时间:2014-03-24 04:57:38

标签: sublimetext2 sublimetext key-bindings

我想知道如何创建一个说明CMD +的键绑定;这将增加一个;在该行的末尾,然后移动下一行。 我怎么能这样做?

1 个答案:

答案 0 :(得分:1)

创建宏eol_semi.sublime-macro

[
    {"command": "move_to", "args": {"to": "eol", "extend": false} },
    {"command": "insert", "args": {"characters": ";"}},
    {"command": "insert", "args": {"characters": "\n"}}
]

然后在用户.sublime-keymap文件中添加一个键绑定

{ "keys": ["super+;"], "command": "run_macro_file", "args": {"file": "Packages/User/Snippets/test_snippets/eol_semi.sublime-macro"} }