Emmet 在 VSCode 中使用 Vue.js 在模板中的“用缩写包装”命令对我来说行为不端。
将代码块包装在任何元素内(div
在此示例中)会导致删除该代码块内的所有缩进。
我已经尝试调整各种设置,但无法弄清楚是什么导致它像这样格式化!
我的 settings.json 文件如下所示:
{
"editor.fontLigatures": true,
"editor.tabSize": 2,
"vetur.validation.template": false,
"vetur.completion.useScaffoldSnippets": false,
"emmet.syntaxProfiles": {
"html": {
"attr_quotes": "single",
"indent": true,
"tag_nl": true
},
"vue-html": "html",
"vue": "html"
},
"window.zoomLevel": -1,
"editor.fontSize": 14,
"sync.gist": "bcd2ebd3919d3e74184418b308e3aa85",
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.preferences.quoteStyle": "single",
"vetur.format.defaultFormatter.html": "none",
"vetur.complete": true,
"workbench.iconTheme": "chalice-icon-theme",
"material-icon-theme.saturation": 0.5,
"editor.fontFamily": "'Fira Code', 'Courier New', monospace",
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#000",
"tab.activeBorder": "#ffff73"
},
"editor.minimap.enabled": false,
"explorer.openEditors.visible": 0,
"editor.wrappingIndent": "indent",
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
"editor.detectIndentation": true,
"emmet.excludeLanguages": [
"markdown"
],
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"vetur.format.defaultFormatterOptions": {
},
"emmet.extensionsPath": "",
"vetur.completion.scaffoldSnippetSources": {
}
}