vetur: Both Emmet and Scaffold Snippets not working
Info
- Platform: Ubuntu 18.04
- Vetur version: 0.21.0
- VS Code version: 1.35.0 (vscodium)
Problem
Typing scaffold into a new Vue file does nothing. No IntelliSense, no expanding.
Also, Emmet is not working inside <template> unless this option is set:
"emmet.includeLanguages": {
"vue": "html"
}
Reproducible Case
- Fresh installation of vscode/vscodium.
- Install Vetur.
- Create a new file, select type as Vue.
- Try some Snippets. In my case
scaffoldandh1inside<template>. - Both are not recognized.
Yes, not much of an info. Could I do anything to help debug this?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 18
- Comments: 35 (6 by maintainers)
Commits related to this issue
- Snippet docs for #1325 comments — committed to vuejs/vetur by octref 5 years ago
- Snippet docs for #1325 comments — committed to yoyo930021/vuter by octref 5 years ago
Apparently on the new versions you have to use “vue” instead of “scaffold”
Type
<vue>and it works@dave2k2 If the “vue” command is not working for you, you can bring back the scaffold by creating a personal snippet for it. If you use vscode, go to Code>Preferences>User Snippets, type vue on the input that will show up and paste this code there:
https://gist.github.com/rochabianca/2c39f611b28dfb51f0fb3ff483afbf51
I made some minor changes, like init the template with a div with the name of the file and already put the name too on the script but you can remove this changes by removing the lines 6 and 11
“vue” creates the template scaffold for me with Vetur 0.22.2 on Windows 10, vscode 1.37.1
According to the updated documentation @zeroidentidad @davexpression and @rochabianca are all correct

<vuewill work however, simply writing vue will not work without the < first. One other option is to start with the worddefault; def has done the trick for me.@bdrtsky Vetur works just fine on Linux Mint for me.
as @davexpression and @rochabianca said scaffold was replaced by type <vue
For those who are facing the Emmet problem in visual studio code, add this in your settings.json and it should work 😄
@bdrtsky You need to open a folder for Vetur to work, as it resolves dependencies from local
node_modules:In my case, the intellisense for snippet is
<vue>or.vue. Look this:plus one on Vetur 0.22.0 - windows 10
@seanfarmar It’s because the
scaffoldchanged its name forvue(don’t know about the emmet problem through) so it shouldn’t work if you typescaffold. But if you want that back, you can use my gist, hereIf you’re on Debian Linux and using VS Code, you might not get Scoffold Snippets instead type
<vue>and hit enter, and it all works.you are a God, tks!!!
Try default It will definitely work
@rochabianca that’s pretty awesome thanks…actually it’s even better!
See https://github.com/vuejs/vetur/issues/1386#issuecomment-520881522.