Compilation 配置Visual Studio代码以在F7键上编译项目
我正在尝试配置VisualStudio代码(VSC)以在F7键上编译项目。不幸的是,此IDE没有用于编辑LiteIDE等设置的GUI 我已经做了以下工作:Compilation 配置Visual Studio代码以在F7键上编译项目,compilation,onclick,task,visual-studio-code,hotkeys,Compilation,Onclick,Task,Visual Studio Code,Hotkeys,我正在尝试配置VisualStudio代码(VSC)以在F7键上编译项目。不幸的是,此IDE没有用于编辑LiteIDE等设置的GUI 我已经做了以下工作: 在VSC中打开了一个“hello.go”文件 按MS页面上提到的Ctrl+Shift+P 已在列表中搜索“其他”,但未找到它 (?)我应该如何使用他们让我选择的“其他任务” 好的,现在我按Ctrl+Shift+B,它显示: “未定义生成任务。请在tasks.json文件中用'isBuildCommand'标记任务。” 我按下蓝色按钮“配置构
{
"version": "0.1.0",
"command": "go build",
"taskName": "goBuild",
"isShellCommand": true,
"args": [""],
"showOutput": "always"
}
// Place your key bindings in this file to overwrite the defaults
[{
"key": "f7",
"command": "workbench.action.tasks.goBuild",
"when": "editorTextFocus"
}]