1.创建一个宏semicolon.sublime-macro:(可以直接创建一个包含下面内容的文件semicolon.sublime-macro,然后存储到
%USERPROFILE%\AppData\Roaming\Sublime Text 3\Packages\User下)
[ { "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+;就可以实现在行尾增加分号,并且还增加了一个换行;
时间: 2024-10-28 23:32:32