Is there a way to define per
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.
上一篇: 文字图像,不断收到错误“没有图像定义”
下一篇: 有没有一种方法来定义per