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?
相关问题
- Extended message for commit via Visual Studio Code
- Where are Automatic Type Acquisition typescript de
- Typescript: Why doesn't visual studio code rep
- .NET Core 3.1 CreateHostBuilder Cannot parse JSON
- How to get VS Code debug data like breakpoints, st
相关文章
- Visual Studio Code, MAC OS X, OmniSharp server is
- Omnisharp in VS Code produces a lot of warnings ab
- Visual Studio Code command for “repeat last comman
- VSCode remove warnings from problems tab
- Configure a TypeScript project with common depende
- Visual Studio Code disabling Normal, Edit and Visu
- Vscode: error TS2307: Cannot find module 'vsco
- How to customize context menu in Visual Studio Cod
As the other answer says, you currently cannot. But until it is fixed, there is a ...
Workaround using AutoHotKey:
Run fixed command line using keyboard shortcut:
The above one launches command line
mytask.exe myfile.txt
on pressing Ctrl+Alt+1.If you want to limit scope of the shortcut from global to VSCode only, add #IfWinActive directive before that line.
Of course, you can also expand the macro to determine the file dynamically (or from user input) but I wanted to show you some minimum example which is a way to go.
Use
runTask
withargs
.You can't currently. Here is the github issue with the feature request. Looks like it keeps getting pushed to 'the next' release.