1

I am running a sublime build system to build my code.

I have 4 variants of the build system, and I want to map the first variant to a hotkey.

Right now I have the command "Build" mapped to F5. But when I hit it, it says...

shell_cmd or cmd is required [cmd: None]

Is there a way to map a specific build system variant to a hotkey?

Here is my build system 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",
    }
]

}

4

1 回答 1

3

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

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

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

于 2016-05-24T17:50:49.730 回答