
select code, click f1, select emmet: wrap with abbreviation
Not working only vue files. Stop working from 1.8 vs code.
I can confirm it's not working in .vue files for me either (works in plain HTML files though):
You need to configure emmet to treat vue file as html. Paste these into vscode settings.
"emmet.includeLanguages": {
"vue-html": "html",
"vue": "html"
}
@HerringtonDarkholme, nope it's worked bad.
If i set
"emmet.includeLanguages": {
"vue-html": "html",
"vue": "html"
}
I'm start get suggest in script block. Previous version, i get suggest only in template block if i set settings like this
"emmet.includeLanguages": {
"vue-html": "html"
}
Sadly wrapping with abbreviation is a feature coming from vscode itself. The code locates at emmet extension, not in vetur. I suggest you open an issue in vscode repo.
@HerringtonDarkholme Thanks. The solution you provided is good enough for me.
In my config the properties in emmet.includeLanguages were arrays, which seems to have stopped it from working. Must have been a change in emmet code in vs code. Working now with configuration from above.
Also have this issue, code("vue": "html") helps, but it also enable html emmet completions in style and script sections what is bad, seems like "vue-html": "html" (without "vue": "html") is broken for some reason...
thanx @HerringtonDarkholme.
I was going crazy with jsp files also.
didnt work didint work didnt got a answer until here
As of today you shouldn't need any emmet config for the emmet features to work.
Nothing changed since my last post, emmet "Wrap with Abbreviation" not working... Latest update.
@Nejik You should open an issue at VS Code side.
@octref trouble only with vetur, all other dialects and other file types works fine
@Nejik OK will take a look.
You need to configure emmet to treat vue file as html. Paste these into vscode settings.
"emmet.includeLanguages": { "vue-html": "html", "vue": "html" }
Works perfectly for me, thanks!
As others have mentioned, you can now wrap code within the script and style sections as well, but I don't really see an issue with that. Nothing is making you wrap code in cases where it doesn't make sense.
seems fixed with new vscode update https://code.visualstudio.com/updates/v1_28#_emmet
The Emmet: Wrap with Abbreviation feature is no longer restricted to files with the .html extension.
Ok, seems they solved the upstream issue. Now you should be able to use it without adding the includedLanguages.
Most helpful comment
You need to configure emmet to treat vue file as html. Paste these into vscode settings.