Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.4k views
in Technique[技术] by (71.8m points)

visual studio code - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use runTask with args.

{
    "key": "shift+cmd+t",
    "command": "workbench.action.tasks.runTask",
    "args": "The name of your task"
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...