首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >对于使用Vue的VS代码,Emmet,'wrap with abbreviation‘删除了缩进

对于使用Vue的VS代码,Emmet,'wrap with abbreviation‘删除了缩进
EN

Stack Overflow用户
提问于 2020-04-26 23:12:22
回答 1查看 1.2K关注 0票数 1

Emmet在模板中使用Vue.js在VSCode中使用'wrap with abbreviation‘命令的行为对我来说是错误的。

将代码块包装在任何元素(本例中为div)中都会导致该代码块中的所有缩进被移除。

我试过调整各种设置,但找不出是什么导致它的格式是这样的!

之前:

之后:

我的settings.json文件如下所示:

代码语言:javascript
复制
{
    "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": {

    }
}
EN

回答 1

Stack Overflow用户

发布于 2020-04-26 23:46:09

问题解决了。

原来我给我使用的快捷键分配了错误的emmet操作,我分配的是wrap individual lines with abbreviation而不是wrap with abbreviation

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61443107

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档