常用
常用快捷键
- 重新加载窗口:命令面板输入Reload Window
- 前进:Ctrl + -
- 后退:Ctrl + Shift + -
- 复制行(向下):Shift + Option + Down
- 复制行(向上):Shift + Option + Up
- 折叠代码:Command + Option + [
- 展开代码:Command + Option + ]
Github Copilot快捷键
Tab 接受当前建议
Esc 取消当前行的建议
Alt + ] 展示下一个建议
Alt + [ 展示上一条建议
Ctl + Shift + P GitHub Copilot 指令命令选择
Cmd+I generate copilot code
Ctrl+Cmd+I toggle copilot chat sidebar
Shift+Cmd+I ask copilot chat
Trigger auto completion
Alt + \ 触发当前行的建议(Trigger inline suggestion)
Ctrl + Enter 打开GitHub Copilot建议面板
ctrl+/ accept panel suggestion
golang项目运行配置
.vscode/launch.json
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "GO RUN",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/main.go",
"debugAdapter": "dlv-dap",
"dlvFlags": ["--check-go-version=false"],
"cwd": "${workspaceFolder}",
"env": {},
"args": []
}
]
}
配置指定运行参数,或项目中包含多个启动程序
.vscode/launch.json
{
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "app",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/app/app.go",
"cwd": "${workspaceFolder}",
"env": {},
"args": [
"-c": "./conf/app.yaml"
"-db": "./conf/mysql.yml"
]
},
{
"name": "admin",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/admin/admin.go",
"cwd": "${workspaceFolder}",
"env": {},
"args": [
"-f1", "./conf/admin.yaml",
"-db": "./conf/mysql.yml"
]
}
]
}
用户settings.json备份
~/.vscode/settings.json
{
"ansible.ansibleLint.enabled": false,
"blockman.n01LineHeight": 0,
"bracketPairColorizer.depreciation-notice": false,
"breadcrumbs.enabled": true,
"diffEditor.wordWrap": "off",
"editor.accessibilitySupport": "off",
"editor.fontSize": 14,
"editor.guides.bracketPairs": false,
"editor.guides.indentation": false,
"editor.inlayHints.enabled": false,
"editor.inlineSuggest.enabled": true,
"editor.suggestSelection": "first",
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "One Dark italic",
"scope": [
"comment",
"entity.other.attribute-name",
"keyword",
"markup.underline.link",
"storage.modifier",
"storage.type",
"string.url",
"variable.language.super",
"variable.language.this"
],
"settings": {
"fontStyle": "italic"
}
},
{
"name": "One Dark italic reset",
"scope": [
"keyword.operator",
"keyword.other.type",
"storage.modifier.import",
"storage.modifier.package",
"storage.type.built-in",
"storage.type.function.arrow",
"storage.type.generic",
"storage.type.java",
"storage.type.primitive"
],
"settings": {
"fontStyle": ""
}
}
]
},
"editor.wordWrap": "off",
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"git.ignoreLegacyWarning": true,
"github.copilot.enable": {
"*": true,
"yaml": true,
"plaintext": true,
"markdown": true,
"scminput": false
},
"hadolint.outputLevel": "hint",
"powermode.combo.timeout": 1,
"powermode.enabled": true,
"powermode.explosions.duration": 20,
"powermode.shake.intensity": 0,
"python.languageServer": "Default",
"redhat.telemetry.enabled": true,
"remote.SSH.configFile": "/Users/ssgeek/OneDrive/VSCode/VSCodeRemote_ssh_file",
"sync.autoDownload": true,
"sync.autoUpload": true,
"sync.gist": "",
"tabnine.experimentalAutoImports": true,
"terminal.integrated.env.osx": {
"FIG_NEW_SESSION": "1"
},
"vscode-office.autoTheme": true,
"vscode-office.openOutline": true,
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#1073cf2d",
"editor.lineHighlightBorder": "#9fced11f",
"statusBar.background": "#008cff",
"statusBar.debuggingBackground": "#008cff",
"statusBar.noFolderBackground": "#008cff"
},
"workbench.colorTheme": "One Dark Pro",
"workbench.iconTheme": "material-icon-theme",
"workbench.statusBar.visible": true,
"[python]": {
"editor.formatOnType": true
},
"github.copilot.advanced": {},
"vs-kubernetes": {
"vs-kubernetes.crd-code-completion": "disabled"
},
"terminal.integrated.enableMultiLinePasteWarning": false,
"files.autoSave": "afterDelay",
"go.testFlags": ["-v"],
"editor.formatOnSave": true,
"editor.fontLigatures": false,
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"html.format.endWithNewline": true,
"javascript.format.semicolons": "insert",
"javascript.format.insertSpaceAfterConstructor": true,
"typescript.format.semicolons": "insert",
"json.format.enable": false,
"json.format.keepLines": true,
"less.format.enable": false,
"git.enableSmartCommit": true,
"window.zoomLevel": -1,
"search.followSymlinks": false,
"files.exclude": {
"
/.git": true,
** "**
/.svn": true,
"
/.hg": true,
** "**
/CVS": true,
"
/.DS_Store": true,
** "**
/tmp": true,
"
/node_modules": true,
** "**
/bower_components": true,
"
/dist": true
},
"files.watcherExclude": {
** "**
/.git/objects/
": true,
** "**
/.git/subtree-cache/
": true,
** "**
/node_modules/
": true,
** "**
/tmp/
": true,
** "**
/bower_components/
": true,
** "**
/dist/**": true
}
}