VSC中的某些Emmet缩写不起作用,例如!'或使用'*'

发布于 2025-02-13 22:24:57 字数 548 浏览 0 评论 0 原文

其他每个片段都在起作用,但是!+TAB不工作。

!片段不起作用

其他片段正在工作

我正在使用Visual Studio代码。我正在使用1.69.0。它以前工作过,但是我想添加net html文件,命名为new.html,因为我已经有index.html。之后,此脚本停止在每个HTML文件上工作,但是其他脚本(例如“ A”,“ DIV”等)正在工作。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

森林迷了鹿 2025-02-20 22:24:57

v1.69.2恢复版本现已发布。 HTML中的Emmet现在正常工作。


看起来它将在恢复版本中,请参见 https://github.com/issues?q=IS%3aissue+label%3Acandidate+repo%3amicrosoft%2fvscode+ repo%3amicrosoft %2FVSCODE-InternalbackLog+repo%3amicrosoft%2FVSCODE-REMOTE-REELE+里程碑%%3A%22June+2022+恢复+2%22+

不知道何时将发布恢复到稳定的版本 - 大概是v1.69.2。 .1 版本已熄灭,修复程序不在其中。

不过,它已经修复了,请参见 https://github.com/github.com/microsoft/microsoft/microsoft/vscode/vscode/sissues/15437555454555543755 ,应该在明天的内部人士建造(07/13/2022)。

测试最新的内部人员:正在工作。正如 ul> li*3 类型的扩展(尽管从来没有停止为我工作 - 但已在其他地方进行了报道)。应在v1.69.2中很快发布。


这是V1.69版本的已知问题,请参见 html emmet建议不要自动显示 https://github.com/microsoft/microsoft/vscode/issues/issues/154517 GitHub上的许多问题!

因此,当您键入时,Emmet片段将不会自动出现,但是您可以按 ctrl/cmd + space (这是命令触发建议)使其出现并正常选择。

尝试 ctrl/cmd + space for在VSCODE V1.69中工作的任何与Emmet相关的NNNNNOT。

您也可以返回v1.68解决问题。

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.

孤凫 2025-02-20 22:24:57

尝试编写“ doc” 而不是“!” “ Doc” 对我有用。

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

寻找我们的幸福 2025-02-20 22:24:57

在Windows 10上,这对我有用:

  1. 转到“设置”,然后在搜索中键入“ emmet.trigger”
  2. 的“ emmet:Tab上的触发扩展”的复选框,将出现
    检查复选框,以允许emmet触发tab上的

扩展用于!+TAB和任何类型的mulitpliers(即Li*4+Tab)。

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).

从此见与不见 2025-02-20 22:24:57

这有助于使我的工作(1.79.2):打开您的JSON设置(在Mac,CMD + Shift + P上,键入“ persexenes:open用户设置json'),并确保存在以下内容:

"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"
},

重新启动VSC,应为在职的。另外,在“ Extenstions”选项卡中,您可以键入“ @builtin emmet”以确保启用扩展名。

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.

南…巷孤猫 2025-02-20 22:24:57

您需要检查此选项或放入“ emmet.triggerexpansionontab”: settings.json 中的true 以使用emmet缩写按下。我意识到这是不起作用的:

  • !,Lorem,>和
    使用的示例:ul> li,li
    3,ul> li*3

它们都没有显示emmet的预览,并且您不能在不启用我上面说的选项甚至甚至甚至甚至甚至检查选项您将看不到预览,即使没有显示它是emmet缩写,也需要自己知道它们,并按下标签。

您也可以使用CTRL +空间。

版Windows 11 Pro
版本21H2

VSCODE版本1.69.0

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, li
    3, 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

友谊不毕业 2025-02-20 22:24:57

我也有同样的问题!不起作用。我找到了另一个执行相同操作的快捷方式:键入HTML:5,然后按Enter。

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

匿名。 2025-02-20 22:24:57

看起来像一个错误,我对1.69.1遇到了同样的问题,VSC团队知道并修复它。应尽快将下一个版本修复。
同时,您可以使用 html:5 doc

同时使用“ html:5”
在此处输入图像描述

或使用“ doc”
在此处输入图像描述

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

悲欢浪云 2025-02-20 22:24:57

@mark的答案有效,另一个工作是使用 html:5 在v1.69中仍然可以正常工作

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

我还不会笑 2025-02-20 22:24:57

是的,自最近更新以来,我也面临这个问题。

某种程度上我得到的解决方案是:
您可以选中“ emmet:使用内联完成”框
在设置中,通过在设置的搜索中键入“ emmet”。
您现在可以看到该建议,然后按下选项卡。

这是我到目前为止拥有的解决方案,但希望我们可以将以前的版本返回。

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.

凝望流年 2025-02-20 22:24:57

在设置中添加文件关联对我有用:

“files.associations”: {“*html”: “html”},

Adding the file association in the settings worked for me:

“files.associations”: {“*html”: “html”},
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文