简体   繁体   中英

VSCode keyboard shortcut for specific task

This keyboard shortcut:

[
  {
    "key": "ctrl+r",
    "command": "workbench.action.tasks.runTask",
    "args": "Hello1"
  },
]

opens a menu of all tasks instead of immediately running the Hello1 task

在此处输入图片说明

tasks.json

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Hello1",
      "type": "shell",
      "command": "echo Hello1",
      "problemMatcher": []
    },
    {
      "label": "Hello2",
      "type": "shell",
      "command": "echo Hello2",
      "problemMatcher": []
    },
  ]
}

This issue is reported to VS Code by another guy. https://github.com/microsoft/vscode/issues/90344

1.43.0 already fixed it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM