Build currently opened file in Visual Studio Code -


i have workspace use smaller test programs write practice concepts. hence, in vs code, have build task each file in folder.

by default, vs code builds task "isdefault": true, flag. ideally, figure out way me build opened file, when switch files editing, not need manually reset flag build task want use.

to knowledge, vs code tasks documentation doen't provide solution. there must way accomplish without manually adjusting flag. appreciated.

to build on rob's answer, can set shortcut key combination trigger each task adding keybindings.json, e.g.

{     "key": "ctrl+h",     "command": "workbench.action.tasks.runtask",     "args": "run tests" } 

where args component replaced task name.

you use in combination ${file} in tasks.json differentiate between separate build types.

e.g. hit ctrl+h python , ctrl+shift+h tsc


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -