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

14,733

Solution 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 } },

Solution 2

Not answering the question but good to know, F7 functions the same as Ctrl+b.

enter image description here

Share:
14,733
spharish
Author by

spharish

Dreamer, Lover, Learner, Coder!!

Updated on June 05, 2022

Comments

  • spharish
    spharish almost 2 years

    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?