Hello!
I am using sublime text 3 in folders / projects mode, not single files.
I am using Edit Command Palette plugin.
I have user keymap with one entry, like that:
Default (Windows).sublime-keymap — User
[
{
"keys": ["f5"],
"command": "exec",
"args": { "cmd": "mingw32-make.exe -j12 --always-make" },
}
]
It runs by F5 just fine, but only if currently opened file located in root directory, where my Makefile is located. The goal is to run that by F5 with any file opened, maybe from child directories. Is there any way to do that?
Note: I am aware of build systems. With user build system I can do what I need that way:
MyBuildSystem.sublime-build
{
"cmd": [ "mingw32-make.exe", "-j12", "--always-make" ],
"working_dir": "${folder}"
}
That build system works just fine, no complaints, exactly what I need.
Is there analogue for “working_dir” and ${folder} but for keymapped commands?
Upd:
I tried that: no effect and no output.
[
{
"keys": ["f5"],
"command": "exec",
"args": {
"cmd": [ "mingw32-make.exe", "-j12", "--always-make" ],
"working_dir": "${folder}"
},
}
]
And I tried that: outputs “${folder}: No such file or directory.”
[
{
"keys": ["f5"],
"command":"exec",
"args": { "cmd": "mingw32-make.exe -j12 --always-make -C ${folder}" },
}
]