之前的文章介绍了 copilot 注册激活,和7个有用的技巧。
今天这篇文章介绍了使用 Github Copilot 的又六个技巧,包括写注释、自动填词、写 list 序列、写翻译、优化配置和修改快捷键。每个技巧都有详细的说明和示例,适合初学者和有经验的开发人员。
写上 ///
符号
换行自动提示参数
帮你水文字
帮你写概要
帮你写小结
如果你的序列有规则,自动给你填上了。
格式
english: xxxxxxxxxxxxxx
chinese:
输出
配置项
ID | 说明 | 默认值 |
---|---|---|
github.copilot.advanced | 推荐参数设置 | [object Object] |
github.copilot.enable | 屏蔽编程语言 [languages](vscode-file://vscode-app/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) | [object Object] |
github.copilot.inlineSuggest.enable | 显示内联建议 | true |
我的配置
// copilot "github.copilot.inlineSuggest.enable": true, "editor.suggest.preview": true, "editor.inlineSuggest.enabled": true, "editor.inlineSuggest.showToolbar": "always", "github.copilot.enable": { "*": true, "yaml": false, "plaintext": false, "scminput": false, "markdown": true, "javascript": true, "python": true }, "github.copilot.advanced": { "inlineSuggestCount": 3 }
key | 说明 |
---|---|
github.copilot.inlineSuggest.enable | 是否开启内联提示 |
editor.suggest.preview | 编辑器提示预览 |
editor.inlineSuggest.enabled | 编辑器内联提示 |
editor.inlineSuggest.showToolbar | 显示提示工具栏 |
github.copilot.enable | 语言开关 |
github.copilot.advanced | 高级设置 |
常用的提词、切换都可以设置成自己习惯的按键.
搜索 github copilot
注意右侧的源类型 Github Copilot
本文介绍了使用 Github Copilot 的六个技巧,包括写注释、自动填词、写 list 序列、写翻译、优化配置和修改快捷键。总的来说,使用 Github Copilot 可以极大地提高开发效率,但也需要注意一些细节,如理解用户需求、规范注释、合理配置等。希望这些技巧能够帮助你更好地使用 Github Copilot。
end
Copyright 2023 ducafecat. All rights reserved.
微信: ducafecat, line: ducafecat,京ICP备2021009050号-3