1,自己录制一个宏,名称为add comma to end.sublime-macro,宏内容如下:
[
{
"args":
{
"extend": false,
"to": "eol"
},
"command": "move_to"
},
{
"args":
{
"characters": ";"
},
"command": "insert"
},
{
"args":
{
"characters": "\n"
},
"command": "insert"
}
]
2,在Key Binding-User 中增加
{ "keys": ["alt+;"], "command": "run_macro_file", "args": {"file":"Packages/User/add comma to end.sublime-macro"} }
3,输入alt+;就可以实现在行尾增加分号,并且还增加了一个换行;