Sublime Build 变体热键

Sublime Build variants hotkey

我是 运行 用于构建我的代码的卓越构建系统。

我有 4 个构建系统变体,我想将第一个变体映射到一个热键。

现在我将命令 "Build" 映射到 F5。但是当我点击它时,它说...

shell_cmd or cmd is required [cmd: None]

有没有办法将特定的构建系统变体映射到热键?

这是我的构建系统 fyi

{

"variants": [

    {
        "name" : "ndk-build",
        "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
        "cmd": ["H:/Tools/SublimeBuild/sublime-ndk-build.bat"],
        "working_dir": "${project_path:${folder}}",            
    },

    {
        "name" : "ant-clean",
        "cmd": ["H:/Tools/SublimeBuild/sublime-ant.bat" , "clean"],
        "working_dir": "${project_path:${folder}}",
    },

    {
        "name" : "ant-install",
        "cmd": ["H:/Tools/SublimeBuild/sublime-ant.bat" ,  "debug" , "install"],
        "working_dir": "${project_path:${folder}}",
    },

    {
        "name" : "Release",
        "cmd": ["H:/Tools/Release.bat"],
        "working_dir": "${project_path:${folder}}/../build",
    }
]

}

只需添加到您的键盘映射:

{ "keys": ["ctrl+f5"], "command": "build", "args": { "variant": "ndk-build" } },

另外:您可以在顶层添加一个命令作为默认命令,并且仍然保留变体。