Sublime Build变种热键

时间:2016-05-24 16:11:24

标签: sublimetext2 sublimetext3 sublimetext sublime-build

我正在运行一个崇高的构建系统来构建我的代码。

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

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

  

需要shell_cmd或cmd   [cmd:无]

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

这是我的构建系统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",
    }
]

}

1 个答案:

答案 0 :(得分:3)

只需添加到您的键盘地图:

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

除此之外:您可以在顶层添加一个命令作为默认命令,并保留变体。