vsCode+Emmet autocompletion) - insert newline inside div after hit 'tab'

久未见 提交于 2019-12-11 07:24:55

问题


by default vsCode does not split div tag into lines:

<div></div>

As I understand this is because div is a blick element. but I want it to autocomplete like this:

<div>
    _
</div>

Underline here is cursor position.

Is there a setting for it?

What I've already found is endWithNewLine, but it is different setting, for files


回答1:


Guys from Github helped:

"emmet.preferences": {
    "format.forceIndentationForTags": [
        "div",
        "header",
        "nav",
        "aside"
    ]
},


来源:https://stackoverflow.com/questions/47239095/vscodeemmet-autocompletion-insert-newline-inside-div-after-hit-tab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!