10

Every other snippet is working, but !+tab is not.

! snippet is not working enter image description here

other snippet is working enter image description here

I am using Visual Studio Code. I'm using 1.69.0. It was working before, but I wanted to add net html file, named that new.html, because I had index.html already. After that this script stopped working on every html file, but other scripts like "a", "div" etc. is working.

Dimple
  • 788
  • 1
  • 11
  • 27
Bek
  • 103
  • 1
  • 6
  • What is VSS (I'm betting it's not Visual Source Safe) and can you tag the specific version of Visual Studio that is affected? – phuzi Jul 08 '22 at 07:49
  • Visual Studio Code i ment sorry, version 1.69.0 – Bek Jul 08 '22 at 08:00
  • Visual Studio 1.69.0!!! Do you mean Visual Studio ___Code___ by any chance? Visual Studio and Visual Studio Code are 2 very different things. – phuzi Jul 08 '22 at 08:03
  • Yeah i ment Visual Studio Code sorry :_) – Bek Jul 08 '22 at 08:04

9 Answers9

10

The v1.69.2 recovery release is out now. Emmet in html is working as it should for me now.


Looks like it will be in the Recovery Release, see https://github.com/issues?q=is%3Aissue+label%3Acandidate+repo%3Amicrosoft%2Fvscode+repo%3Amicrosoft%2Fvscode-internalbacklog+repo%3Amicrosoft%2Fvscode-remote-release+milestone%3A%22June+2022+Recovery+2%22+.

Don't know when the recovery release to Stable - presumably v1.69.2 - will be released. The .1 release is out and the fix is not in it.

It has been fixed though, see https://github.com/microsoft/vscode/issues/154375, and should be in the Insiders Build tomorrow (07/13/2022).

Testing the latest Insiders: ! is working. As is ul>li*3 type expansions (although that never stopped working for me - but it has been reported elsewhere). Should be in the v1.69.2 release out soon.


It is a known issue with the v1.69 release, see html emmet suggestion not automatically display or https://github.com/microsoft/vscode/issues/154517 for example. Lots of issues on github on ! and * not working.

So the emmet snippet will not appear automatically when you type !, but you can press Ctrl/Cmd+Space (which is the command Trigger Suggest) to make it appear and select normally.

Try Ctrl/Cmd+Space for anything emmet-related nnnnnot working in vscode v1.69.

You could also go back to v1.68 to solve the issue.

Mark
  • 143,421
  • 24
  • 428
  • 436
5

Try to write "doc" instead of "!". "doc" works for me.

Skully
  • 2,882
  • 3
  • 20
  • 31
jerek420
  • 51
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 11 '22 at 13:18
3

On Windows 10, this worked for me:

  1. Go to "Settings" and type "emmet.trigger" in the search
  2. A checkbox for "Emmet: Trigger Expansion On Tab" will appear Check the checkbox for allowing Emmet to trigger expansion on tab

After I did that, it worked just fine for !+TAB and any type of mulitpliers (i.e. li*4+TAB).

2

You need to check this option or put "emmet.triggerExpansionOnTab": true in settings.json to use the emmet abbreviation pressing TAB. I realized this ones what is not working:

  • !, lorem, >, and . Examples of use: ul>li, li3, ul>li*3

None of them shows the preview of the emmet, and you can't use them pressing TAB without enabling the option that I sayed above, and even checking the option you won't be able to see the previews, you'll need to know them by yourself and press the TAB even though nothing showing that it's a emmet abbreviation.

You can use CTRL + SPACE too.

Edition Windows 11 Pro Version 21H2

VSCODE Version 1.69.0

1

I had the same issue with the ! not working. I found another shortcut that does the same thing: type html:5, and press enter.

gabefox
  • 11
  • 2
1

Looks like a bug, I have the same problem with 1.69.1, the VSC team is aware and fixing it. Should be fixed with the next release soon. Meanwhile, you can use either HTML:5 or doc

meanwhile use "HTML:5" enter image description here

or use "doc" enter image description here

SaidG.
  • 11
  • 2
1

This helped get mine working (1.79.2): Open up your JSON settings (on Mac, cmd + shift + p and type in 'Preferences: Open User Settings JSON') and make sure the following is present:

"emmet.triggerExpansionOnTab": true,
"emmet.showSuggestionsAsSnippets": true,
"emmet.showExpandedAbbreviation": "always",
"files.associations": {
    "*html": "html",
    "*njk": "html"
},
"emmet.useInlineCompletions": true,
"emmet.optimizeStylesheetParsing": false,
"emmet.includeLanguages": {
    "javascript": "javascriptreact",
    "typescript": "typescriptreact",
    "vue-html": "html",
    "vue": "html",
    "razor": "html",
    "plaintext": "pug",
    "django-html": "html"
},

Restart VSC and should be working. Alternatively, in the extenstions tab, you can type '@builtin emmet' to make sure the extension is enabled.

mashaad
  • 11
  • 2
0

While @Mark's answer works, another work around would be to use the html:5 snippet which still works as expected in v1.69

Lance
  • 3
  • 1
0

Yes, I am facing this issue too since the latest update.

Somehow the solution I have got is : You can check the box “Emmet: Use Inline Completions” In settings by typing “emmet” in the setting’s search. You can see the suggestion now and choose it by pressing the tab.

This is the solution I have got till now but hoping that we could have the previous version back.

  • This sort of works - inline suggestions do work but that is different than regular suggestions. For example, you should be able to tyoe `!` and see at least 2 suggestions `!` and `!!` which provide different input. While enabling inline completions does show the first of those inline (it does not show the suggestion list) you would have no way of knowing that there is another suggestion `!!` possible. So enabling inline completions is a partial workaround but not a real fix. – Mark Jul 09 '22 at 22:33
  • yes, you are right @Mark I am too waiting for the permanent solution which shows! with !! automatically. – HAMZA IMRAN Jul 10 '22 at 02:35