Sublime Text 3 Settings: Save Twice

匿名 (未验证) 提交于 2019-12-03 01:26:01

问题:

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"]      ]   }  } 


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