文章目录
- procedure
- setting.json (origin)
- setting.json (given by [https://dontla.blog.csdn.net/article/details/156949670](https://dontla.blog.csdn.net/article/details/156949670))
- settings.json (Pruned)
- VSCode settings.json 字段详细解释
- 界面与主题设置
- 编辑器设置
- 更新与系统设置
- 扩展与工具设置
- 终端设置
- 说明
procedure
setting.json (origin)
{"window.commandCenter":true}setting.json (given byhttps://dontla.blog.csdn.net/article/details/156949670)
{"window.commandCenter":1,"update.enableWindowsBackgroundUpdates":false,"update.mode":"none","workbench.colorTheme":"Default Light+","workbench.statusBar.visible":false,"editor.fontFamily":"Fira Code, Consolas,'Courier New', monospace","editor.fontSize":15,"editor.lineHeight":1.8,"editor.tabSize":2,"editor.codeActionsOnSave":{"source.fixAll":"explicit"},"editor.minimap.enabled":true,"liveServer.settings.donotShowInfoMsg":true,"git.confirmSync":false,"terminal.integrated.defaultProfile.windows":"Command Prompt"}settings.json (Pruned)
{"window.commandCenter":true,"update.enableWindowsBackgroundUpdates":false,"update.mode":"none","editor.fontFamily":"Fira Code, Consolas,'Courier New', monospace","editor.fontSize":15,"editor.lineHeight":1.8,"editor.tabSize":2,"editor.codeActionsOnSave":{"source.fixAll":"explicit"},"editor.minimap.enabled":true,"terminal.integrated.defaultProfile.windows":"Command Prompt"}VSCode settings.json 字段详细解释
界面与主题设置
"window.commandCenter": 1- 控制命令中心(Command Center)的行为,值为1表示启用命令中心功能。命令中心是VSCode中快速访问命令的界面,值1表示启用。
"workbench.colorTheme": "Default Light+"- 设置VSCode的界面主题为"Default Light+"(浅色主题)。这是VSCode内置的浅色主题,提供良好的阅读体验。
"workbench.statusBar.visible": false- 隐藏状态栏(位于VSCode底部的状态栏,显示文件编码、行号、光标位置等信息)。设置为
false后,状态栏将不再显示。
- 隐藏状态栏(位于VSCode底部的状态栏,显示文件编码、行号、光标位置等信息)。设置为
编辑器设置
"editor.fontFamily": "Fira Code, Consolas,'Courier New', monospace"- 设置编辑器字体,优先使用Fira Code(支持连字的编程字体),其次是Consolas,然后是Courier New,最后是通用的等宽字体。
"editor.fontSize": 15- 设置编辑器字体大小为15像素。
"editor.lineHeight": 1.8- 设置行高(行间距)为字体大小的1.8倍,使代码更易读。
"editor.tabSize": 2- 设置制表符(Tab)的大小为2个空格,这是常见的代码风格设置。
"editor.codeActionsOnSave": { "source.fixAll": "explicit" }- 设置保存时执行的代码操作,"source.fixAll"表示在保存时应用所有修复,"explicit"表示需要显式触发(而非自动应用)。
"editor.minimap.enabled": true- 启用编辑器右侧的迷你地图(minimap),显示整个文件的概览,便于快速导航。
更新与系统设置
"update.enableWindowsBackgroundUpdates": false- 禁用Windows系统上的后台更新功能,防止VSCode在后台自动更新。
"update.mode": "none"- 设置VSCode的更新模式为"none",表示禁用自动更新功能,不会自动检查或安装更新。
扩展与工具设置
"liveServer.settings.donotShowInfoMsg": true- 针对Live Server扩展的设置,防止在启动服务器时显示信息消息,避免干扰。
"git.confirmSync": false- 设置Git同步操作不需要确认,当执行Git同步操作(如Pull、Push)时,不会弹出确认对话框。
终端设置
"terminal.integrated.defaultProfile.windows": "Command Prompt"- 设置Windows系统下集成终端的默认配置文件为"Command Prompt"(Windows命令提示符),而不是PowerShell或WSL。
说明
- 这个配置文件主要针对Windows系统(因为有
windows后缀的设置)。 - 该配置专注于提升编辑体验:使用Fira Code字体、设置合适的缩进和行高、隐藏状态栏以减少干扰、启用迷你地图辅助导航。
- 通过禁用自动更新和Git确认提示,减少了不必要的干扰。
- 针对Live Server扩展的设置避免了启动时的提示信息,提升了使用体验。
这个配置文件是一个典型的"高效编码"配置,平衡了视觉舒适度、编辑效率和功能需求,特别适合需要专注编码的开发者。