vscode settings.json 配置推荐
时间: 2023-09-22 20:10:29 浏览: 273
以下是一些常用的推荐的 VS Code `settings.json` 配置项:
```json
{
"editor.tabSize": 2, // 设置缩进的空格数
"editor.wordWrap": "on", // 设置文字换行方式
"editor.autoIndent": true, // 启用自动缩进
"editor.formatOnSave": true, // 在保存时自动格式化代码
"files.exclude": {
"**/.git": true, // 排除 .git 文件夹
"**/.svn": true // 排除 .svn 文件夹
},
"workbench.colorTheme": "Default Dark+", // 设置主题
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", // 设置终端使用的默认 shell(Windows 平台)
"terminal.integrated.shell.linux": "/usr/bin/bash", // 设置终端使用的默认 shell(Linux 平台)
"terminal.integrated.shell.osx": "/bin/bash", // 设置终端使用的默认 shell(Mac 平台)
"git.enableSmartCommit": true, // 启用智能提交,将已暂存的文件自动包含在提交中
"git.autofetch": true, // 自动获取远程 Git 分支的最新状态
"typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, // 在匿名函数的 function 关键字后插入空格
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false // 在非空括号的开头和结尾插入空格
}
```
这些配置项可以根据个人偏好进行调整。你可以将这些配置项复制到你的 `settings.json` 文件中,并根据需要进行修改。保存文件后,配置将生效。
阅读全文
相关推荐

















