常用设置(setting.json)
{
"editor.parameterHints.enabled": true, // 开启参数预览窗口
// 设置字体颜色
"editor.semanticTokenColorCustomizations": {
"enabled": true, // enable for all themes
"rules": {
// "*.static": {
// "foreground": "#ff0000",
// "fontStyle": "bold"
// },
// "property": { //属性
// "foreground": "#10ec98",
// "fontStyle": "bold"
// },
"macro": { //宏
"foreground": "#dc5dec",
// "fontStyle": "bold"
},
// "function": { //函数
// "foreground": "#5491e
// },
"variable.global": { //全局变量
"foreground": "#21f33de7",
// "fontStyle": "bold"
},
// "variable.local": { //局部变量
// "foreground": "#2271da",
// "fontStyle": "bold"
// },
"enumMember": { //全局变量
"foreground": "#b0e719e1",
// "fontStyle": "bold"
},
}
},
// 在 terminal 中添加 gitbash
"terminal.integrated.profiles.windows": {
"gitBash": { //这里的名称开头若是大写不能有空格(如:GitBash)
"path": "E:\\Program Files\\Git\\bin\\bash.exe", //此处是git本地安装路径
}
},
// 将 terminal 的默认窗口设置为 gitbash
"terminal.integrated.defaultProfile.windows": "gitBash",
"bracketPairColorizer.depreciation-notice": false,
"editor.tabCompletion": "on",
"editor.detectIndentation": false,
}
Tab 键
设置Tab键4个空格,将 Tab Size 设置为4即可。
如果代码不是默认 4字节对齐,将 Detect Indentation 的√ 去掉即可。
代码指定长度换行
编辑器路径: 文件 -> 首选项 -> 设置, 在设置中输入 wordwrap, 修改内容如下:
注: 添加完配置后及时生效 ,不需要重新加载vscode;
2 在vscode中添加指定长度竖线提示
编辑器路径: 文件 -> 首选项 -> 设置, 在设置中输入 ruler, 点击settings.json 修改内容如下: