1、terminal清屏

命令行输入 cls

2、滚轮调整字体大小

File-Preference-Settings-Text Editor-Font,Edit in settings.json,添加如下:
, //记得加逗号
"editor.mouseWheelZoom": true

参考:
https://blog.csdn.net/u013250861/article/details/124895199

3、黑白背景主题

File-Preference-Settings-Color Theme
Dark是深色,Light是浅色。

4、如何让 VSCode 打开文件始终在新标签页打开?

setting,搜索“workbench.editor.enablePreview”,去掉勾选。
单机是预览模式,会覆盖掉之前的标签,因此要么总是双击,要么关掉预览。
参考:https://blog.csdn.net/qq_46153157/article/details/124430547

5、设置代码提示

配置到workspace Setting里面。

//用户配置
{
    "git.path": "D:/install/Git/bin/git.exe",
    "editor.mouseWheelZoom": true,  //滚轮调整字体大小
    "editor.fontLigatures": false,
    "workbench.startupEditor": "none",
    "editor.minimap.enabled": false,
    "workbench.editor.enablePreview": false,
    "go.autocompleteUnimportedPackages": true, // 自动补全和自动导入包
    "go.gocodePackageLookupMode": "go", //go代码包查找模式?
    "go.gotoSymbol.includeImports": true,
    "go.useCodeSnippetsOnFunctionSuggest": true,
    "go.gopath": "C:/Users/ien5he/go", //通过 go env 命令查找
    "go.inferGopath": true,  // //第三方库代码提示
    "go.formatTool":"gofmt", // 由于golang是强类型语言,所以有一个好的代码格式化工具开发起来会事半功倍,golang官方提供的代码格式化工具是goreturns 【不知道为啥不能用??】
    "go.useCodeSnippetsOnFunctionSuggestWithoutType": true, //在函数建议中使用代码段,不使用类型
    "go.useLanguageServer": true, //使用Google的Go语言服务器“gopls”为语言功能提供支持,如代码导航、完成、重构、格式化和诊断。
    //"go.gotoSymbol.includeGoroot": true, //过时了,根本不需要设置GOROOT了?
}
//工作区配置
{
    "go.inferGopath": true,
    "go.useCodeSnippetsOnFunctionSuggest": true,
    "go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
    "go.useLanguageServer": true,
    "go.autocompleteUnimportedPackages": true
}

其中重要的选项是

//注意【用户】和【工作区】的两个setting都得这么设置
"go.inferGopath" 要设置为 true .
"go.gopath" 的路径要设置为 你自己的gopath的路径。 如果有多个要用 “;”(windows)或者":"(其他)隔开。
之后就可以愉快的写代码了。

参考:
https://www.cnblogs.com/Dennis-mi/p/8280552.html
https://blog.csdn.net/hero_java/article/details/115823347

6、显示大纲

窗口显示一个文件中定义的所有函数、变量、结构体/类等

如果不看变量,可以去掉:
Ctrl+shift+p,输入setting.json,选用户设置,加上一行:

"outline.showVariables": false

7、顶部的菜单栏收缩成三横线,顶部变成了一个搜索框和左右箭头,难过,不恢复原样根本干不了活

查半天才找到方法:顶部命令中心的勾选去掉就好了!!

参考:
https://blog.csdn.net/qq_36413982/article/details/128116401

8、搜索时排除特定文件夹

在settings中搜索search.exclude,添加文件夹**/SI_Proj.si4project

posted on 2022-01-06 17:42  西伯尔  阅读(74)  评论(0编辑  收藏  举报