示例命令:
editor.action.goToDeclaration
像这样:
{
"version": "2.0.0",
"tasks": [
{
"label": "gotoD",
"type": "vscode",
"command": "editor.action.goToDeclaration"
}
]
}
答案 0 :(得分:0)
您可以在task.json中添加命令
{
"version": "2.0.0",
"tasks": [
{
"label": "My Command",
"type": "shell",
"args": [],
"command": "${command:my-command}",
"presentation": {
"reveal": "never",
"panel": "shared",
}
}
]
}