之前每次寫完代碼都是雙引號還有分號,看著很難受,就像修改一下,讓它變成單引號,并且不加上引號:如下形式,看著簡潔清晰明了
修改方式:更改 settings.json 文件
快捷鍵“Ctrl + Shift + P”打開命令面板
加上這幾個配置:
貼上我的完整配置:文章來源:http://www.zghlxwxcb.cn/news/detail-700468.html
{
"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"
}
}
?文章來源地址http://www.zghlxwxcb.cn/news/detail-700468.html
到了這里,關(guān)于vscode保存格式化自動去掉分號、逗號、雙引號的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!