Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run a custom task (different from test or build) from a keychord shortcut in VSCode?

I know I can assign a keychord to 2 standard tasks: build and test in VSCode. I need to do the same with a custom task. How can I do it?

like image 994
Trident D'Gao Avatar asked Jan 06 '17 17:01

Trident D'Gao


2 Answers

Use runTask with args.

{
    "key": "shift+cmd+t",
    "command": "workbench.action.tasks.runTask",
    "args": "The name of your task"
}
like image 61
Geri Borbás Avatar answered Sep 22 '22 10:09

Geri Borbás


You can't currently. Here is the github issue with the feature request. Looks like it keeps getting pushed to 'the next' release.

like image 34
alexriedl Avatar answered Sep 21 '22 10:09

alexriedl