Scott Watermasysk Husband, Father, Bootstrapper, Developer, Builder, Shipper.

👩‍💻 How to Execute a Terminal Command in VSCode

Published:

VSCode has a good story for using the terminal within the IDE. However, there is no built in way to execute a command via a keyboard shortcut.

Thankfully, I found an extension which easily enables this, Command Runner.

Run custom shell command defined in vs code configuration and node module package.json

With this in place, I was able to add keyboard shortcut which will execute Standard's fix commmand.

{
"key": "ctrl+alt+s",
"command": "command-runner.run",
"args" : {"command": "standardrb ${file} --fix"}
}