I don't know anything about the Puppet extension but in general here is how you can bind a shell command to a keychord:
Make a task for it (.vscode/tasks.json
):
{
"version": "2.0.0",
"tasks": [{
"label": "node version",
"command": "node",
"args": [
"-v"
],
"type": "shell"
}]
}
In the args
you may use ${file}
for the current file.
Then add this option to your keybindings.json
(you can find them in Command Palette under “Preferences: Open keyboard shortcuts (JSON)”):
{
"key": "shift+escape",
"command": "workbench.action.tasks.runTask",
"args": "node version"
},
{ "version": "2.0.0", "tasks": [ { "label": "puppetlint", "type": "shell", "command": "puppet-lint", "args": ["-f", "${file}"] } ] }
Keybindings.json[ { "key":"Alt+L", "command":"workbench.action.tasks.runTask", "args": "puppetlint" } ]
working perfectly. thanks! – Glutton