在 Sublime Text 3 中,如何像在 Sublime Text 2 中那样分别为 "Build and Run" 和 "Build only" 设置快捷方式?

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

在 Sublime Text 3 中,当我们按下 Ctrl+Shift+B 时,我们可以选择执行 "Build and Run" 或 "only Build",而 Ctrl+B 会执行之前选择的操作二。但我希望它是这样的,当我按下 Ctrl+Shift+B 时,它应该直接构建和 运行 并且只有当我按下 Ctrl+B 时才构建,就像在 Sublime Text 2 中一样。有人可以帮我吗?

将此添加到您的 sublime-keymap 应该会产生预期的行为:

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

但是您可能想要重新映射,将选项列表保留为 alt+b:

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

不回答问题但很高兴知道,F7 的功能与 Ctrl+b 相同。