I have a workspace that I use for smaller test programs I write to practice concepts. Hence, in VS Code, I have a build task for each file in the folder.
By default,
To Build on Rob's Answer, you can also set a shortcut key combination to trigger each task by adding to keybindings.json
, e.g.
{
"key": "ctrl+h",
"command": "workbench.action.tasks.runTask",
"args": "Run tests"
}
where the args
component is replaced with the task name.
You could use this in combination with ${file}
in tasks.json
to differentiate between the separate build types.
e.g. hit Ctrl+h for python and Ctrl+Shift+h for tsc