Vetur: *.vue files Emmet isnt work!

Created on 20 Feb 2017  ·  8Comments  ·  Source: vuejs/vetur

In template tag, Emmet syntax is not available.sucks!

Most helpful comment

This is fixed in 0.3.5. Try update.

Basically, region between <template> is now marked as vue-html instead of html to provide better support for vue's interpolation and directives.

You need to add this to your setting:

"emmet.syntaxProfiles": {
  "vue-html": "html"
}

vetur

All 8 comments

Add the following to your setting and it works for template, but not stylesheet.

"emmet.syntaxProfiles": {
  "vue": "html"
},

Me too when i update to 0.3.3. So i rollback to 0.3.2.

This is fixed in 0.3.5. Try update.

Basically, region between <template> is now marked as vue-html instead of html to provide better support for vue's interpolation and directives.

You need to add this to your setting:

"emmet.syntaxProfiles": {
  "vue-html": "html"
}

vetur

it works!thanks~

Hi @octref :hand: , I did it.

It works for emmet but does not working vue snippets at this time. Is there any solution for use vue snippets + emmet features both?

image

Edit:
I'm using a scaffold snippet for now.

    // user snippets/html.json
    "Vuejs scaffold": {
        "prefix": "scaffold",
        "body": [
            "<template>",
                "\t<div id=\"\">",
                "",
                "\t</div>",
            "</template>",
            "",
            "<script>",
                "\texport default{",
                    "\t\tname: '',",
                    "",
                "\t};",
            "</script>",
            "",
            "<style lang=\"scss\">",
            "",
            "</style>"
        ],
        "description": "Create vuejs scaffold"
    },

If you are using "emmet.useNewEmmet", it's not supported in vetur yet but probably will be next month.

I don't know what features are included new emmet. But I did set "emmet.useNewEmmet" as false and it works now. Thank you @octref God bless you. :smile:

Was this page helpful?
0 / 5 - 0 ratings