vscode保存格式化自动去掉分号、逗号、双引号

之前每次写完代码都是双引号还有分号,看着很难受,就像修改一下,让它变成单引号,并且不加上引号:如下形式,看着简洁清晰明了

修改方式:更改 settings.json 文件

快捷键"Ctrl + Shift + P"打开命令面板

加上这几个配置:

贴上我的完整配置:

javascript 复制代码
{
    "editor.fontSize": 18,
    "editor.linkedEditing": true,
    "editor.unicodeHighlight.ambiguousCharacters": false,
    "extensions.ignoreRecommendations": true,
    "editor.unicodeHighlight.invisibleCharacters": false,
    "explorer.confirmDragAndDrop": false,
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "css.hover.references": false,
    "editor.hover.enabled": false,
    "html.hover.references": false,
    "prettier.useEditorConfig": true,
    "prettier.jsxSingleQuote": true,
    "prettier.singleQuote": true,
    "prettier.trailingComma": "none",
    "prettier.semi": false,
    "explorer.confirmDelete": false,
    "security.workspace.trust.untrustedFiles": "open",
    "cssrem.rootFontSize": 80,
    "liveServer.settings.donotShowInfoMsg": true,
    "terminal.integrated.fontSize": 13,
    "liveServer.settings.donotVerifyTags": true,
    "vetur.validation.template": false,
    "vetur.validation.script": false,
    "eslint.enable": false,
    "gitlens.advanced.messages": {
        "suppressLineUncommittedWarning": true
    },
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "workbench.iconTheme": "vscode-icons",
    "workbench.colorTheme": "One Dark Pro Flat",
    "terminal.external.osxExec": "iTerm.app",
    "workbench.startupEditor": "none",
    "path-intellisense.mappings": {
        "@": "${workspaceRoot}/src"
    },
    "vsicons.dontShowNewVersionMessage": true,
    "emmet.triggerExpansionOnTab": true,
    "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[vue]": {
        "editor.defaultFormatter": "octref.vetur"
    },
    "[typescriptreact]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[typescript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    }
}
相关推荐
愿天垂怜1 小时前
【C++脚手架】ffmpeg 库的介绍与使用
linux·服务器·开发语言·c++·ide·git·ffmpeg
cheungxiongwei.com3 小时前
VSCode Copilot 如何配置第三方API/自定义端点?
ide·vscode·copilot
游戏开发爱好者83 小时前
iOS开发工具推荐:Xcode、AppCode、SwiftLint使用心得与效率提升
ide·vscode·macos·ios·个人开发·xcode·敏捷流程
AI行业学习3 小时前
CC-Switch 下载、安装与使用配置指南【2026.5.29】
java·开发语言·vscode·python·eclipse·laravel
huangfuyk3 小时前
前端使用Cursor编辑器方面遇到的问题及注意细节
前端·编辑器·ai编程·cursor
H Journey3 小时前
Windows下通过vscode连接 Linux服务器
windows·vscode·venv
青山如墨雨如画3 小时前
【Claude】Win11系统VSCode环境中Claude+Deepseek报错的全自动解决方式
vscode·aigc·claude·authropic
Codiggerworld3 小时前
Neovim vs Vim:该不该“跳槽”?
编辑器·vim·跳槽
天上路人20 小时前
AI 降噪不是“凭空复原语音”,而是在“已有语音信息”的基础上进行增强。
ide·人工智能·macos·语音识别·xcode
权、狐妖1 天前
【Vscode安装ESlint插件、下载ESLint包以及他们之间的关系和使用】
ide·vscode·编辑器