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+;就可以实现在行尾增加分号,并且还增加了一个换行;

相关文章:

  • 2021-09-05
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2021-06-13
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2022-01-04
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案