Currently I define shortcuts for build variants in my global config. Is there a way to do the same, but using <my-project>.sublime-project
config file?
I tried to define them inside "settings" field - didn't work:
"settings": [
{ "keys": ["ctrl+shift+a"], "command": "build", "args": {"variant": "my_variant"} }
]
I don't think there is a way to define keymaps outside of .sublime-keymap
files, which AFAIK need to be stored under the Packages
hierarchy - for example, in Packages/User/Default (<your OS>).sublime-keymap
, as Sublime ignores keymap files with other names.
However, for what you're trying to do, there is a workaround. The .sublime-project
file supports a "build_systems"
setting:
"build_systems":
[
{
"name": "List",
"cmd": ["ls"]
}
]
By appropriately modifying this on a per-project basis you can enable the Automatic
build system and have your specified one run when you hit CtrlB. More information on build systems is available here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With