How to run command on save in Sublime Text 3?

前端 未结 1 1007
花落未央
花落未央 2021-02-07 12:39

Sublime Text offers built-in commands, such as paste, new_window, toggle_comment etc. In addition, some plugins offer their own commands t

相关标签:
1条回答
  • 2021-02-07 13:01

    Sublime-hooks package allows you to run packages based on event (on new, on save, etc.), so you can use it to achieve your goal. Just add this code to CSS syntax settings:

    "on_pre_save_language": [
        {
            "command": "css_comb"
        }
    ]
    

    If you are familiar with plugins maybe you can make a plugin that extends EventListener and override on_post_save or on_pre_save methods.

    0 讨论(0)
提交回复
热议问题