In Sublime Text 3, how to have shortcuts for “Build and Run” and “Build only” separately like it was in Sublime Text 2?

旧街凉风 提交于 2019-12-09 17:54:09

问题


In Sublime Text 3,when we press Ctrl+Shift+B, we are given the option to either do "Build and Run" or "only Build", whereas Ctrl+B executes the previously chosen operation among the two. But I want it to be like, it should directly build and run when I press Ctrl+Shift+B and only build when I press Ctrl+B like it was in Sublime Text 2. Can someone help me out?


回答1:


Addings this to your sublime-keymap should result in the expected behavior:

{ "keys": ["ctrl+b"], "command": "build", "args": { "variant": "" } },
{ "keys": ["ctrl+shift+b"], "command": "build", "args": { "variant": "Run" } },

However you might want to remap keep the list of options to alt+b:

{ "keys": ["alt+b"], "command": "build", "args": { "select": true } },


来源:https://stackoverflow.com/questions/35455988/in-sublime-text-3-how-to-have-shortcuts-for-build-and-run-and-build-only-se

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