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"
    }
}
相关推荐
ithicker5 小时前
Pycharm+Deepseek结合使用Continue插件无法返回中文产生乱码
ide·python·pycharm
wukan8885 小时前
【SMTP】在线配置测试工具,如何配置接口?
git·网络协议·编辑器
伊卡洛斯az7 小时前
vim的跳转看头文件与分屏
linux·编辑器·vim
散峰而望8 小时前
基本魔法语言函数(一)(C语言)
c语言·开发语言·编辑器·github
Jonathan Star13 小时前
Vue JSON结构编辑器组件设计与实现解析
vue.js·编辑器·json
不染尘.21 小时前
2025_11_7_刷题
开发语言·c++·vscode·算法
这儿有一堆花1 天前
IDE 开发的一天
ide
swear011 天前
VSCODE 插件 rust-analyzer 使用遇到的问题 快捷键查看定义
ide·vscode·rust
pengzhuofan1 天前
IntelliJ IDEA 常用快捷键
java·ide·intellij-idea
麦克马1 天前
Visual Studio Code 控制台乱码问题
vscode