In tasks.json
, create a task to run the .bat
. Something like this:
{
"label": "MY_TASK",
"type": "shell",
"command": "MY_BAT_FILE.bat",
"presentation": {"echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": true},
"group": {"kind": "build", "isDefault": true},
},
Then, use the Tasks: Run Build Task
hotkey (CtrlShiftB by default).
You can have more than one such task.
At most one task can have "isDefault": true
, the one that CtrlShiftB should run.
You can assign custom hotkeys to those tasks, by adding following to your keybindings.json
:
{"key": "f5", "command": "workbench.action.tasks.runTask", "args": "MY_TASK"},
// ^~ key ^~~~~~~ task name
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…