VsCode配置
{
// 启动时不显示欢迎页面
“workbench.startupEditor”: “none”,
// 编辑器字体大小
“editor.fontSize”: 16,
// 缩进空格数
“editor.tabSize”: 2,
// 编辑器主题
“workbench.colorTheme”: “Monokai”,
// 自定义代码颜色
“editor.tokenColorCustomizations”: {
“comments”: “#82e0aa”, // 注释颜色
“numbers”: “#AE81FF”, // 数字颜色
“variables”: “#00bfff”, // 变量颜色
“strings”: “#e2d75dbd”, // 字符串颜色
“keywords”: “#ff0000” // 关键字颜色
},
// 自定义工作区颜色
“workbench.colorCustomizations”: {
“editor.selectionBackground”: “#aa0000” // 选中文本的背景色
},
// 启用括号对指南
“editor.guides.bracketPairs”: true,
// 文件图标主题
“workbench.iconTheme”: “material-icon-theme”,
// Vue文件默认格式化工具
“[vue]”: {
“editor.defaultFormatter”: “esbenp.prettier-vscode”
},
// 允许从文件夹运行npm命令
“npm.enableRunFromFolder”: true,
// 在函数括号前插入空格
“javascript.format.insertSpaceBeforeFunctionParenthesis”: true,
// 禁用自动更新
“update.mode”: “none”,
// 不显示更新说明
“update.showReleaseNotes”: false,
// 禁用Git同步确认
“git.confirmSync”: false,
// Prettier格式化配置:每行最大字符数
“prettier.printWidth”: 200,
// Prettier使用制表符而不是空格
“prettier.useTabs”: true,
// 禁用扩展自动更新
“extensions.autoUpdate”: false,
// 禁用扩展自动检查更新
“extensions.autoCheckUpdates”: false,
// 在差异编辑器中不忽略空格
“diffEditor.ignoreTrimWhitespace”: false,
// 移动文件时自动更新Markdown链接
“markdown.updateLinksOnFileMove.enabled”: “always”,
// 显示200字符的标尺线
“editor.rulers”: [
200
],
// 忽略Git rebase警告
“git.ignoreRebaseWarning”: true,
// 允许打开不受信任的文件
“security.workspace.trust.untrustedFiles”: “open”,
// 窗口缩放级别
“window.zoomLevel”: -1,
// 保存时自动格式化
“editor.formatOnSave”: true,
// 失去焦点时自动保存
“files.autoSave”: “onFocusChange”
}