Sublime Text 3 Settings: Save Twice

自作多情 提交于 2019-12-25 10:26:03

问题


I am not sure if this is the correct place to ask this or not, if it's not please let me know where would be the right place.

There is a well known issue with LiveReload for Sublime Text in which the changes are not shown unless you save twice.

I'm wondering if there is a way to edit the settings to have ST automatically save twice when you hit save.


回答1:


You can override the default keybinding to instead save twice. In order to do that you will need a way to call the "save" command more than once. This post tells how to do that. Basically, install the Chain of Command package so that you may call the custom "chain" command, which will run the commands you pass as an array of args. This will allow you to define your new keybinding in your keybindings file.

Default (OSX).sublime-keymap — User

{ "keys": ["super+s"], 
  "command": "chain",   
  "args": {
     "commands": [
       ["save"],
       ["save"]
     ]
  } 
}


来源:https://stackoverflow.com/questions/33004829/sublime-text-3-settings-save-twice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!