VSC中的某些Emmet缩写不起作用,例如!'或使用'*'
其他每个片段都在起作用,但是!+TAB不工作。
我正在使用Visual Studio代码。我正在使用1.69.0。它以前工作过,但是我想添加net html文件,命名为new.html,因为我已经有index.html。之后,此脚本停止在每个HTML文件上工作,但是其他脚本(例如“ A”,“ DIV”等)正在工作。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
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)。
这是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).
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 commandTrigger 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.
尝试编写
“ doc”
而不是“!”
。“ Doc”
对我有用。Try to write
"doc"
instead of"!"
."doc"
works for me.在Windows 10上,这对我有用:
检查复选框,以允许emmet触发tab上的
扩展用于!+TAB和任何类型的mulitpliers(即Li*4+Tab)。
On Windows 10, this worked for me:
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).
这有助于使我的工作(1.79.2):打开您的JSON设置(在Mac,CMD + Shift + P上,键入“ persexenes:open用户设置json'),并确保存在以下内容:
重新启动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:
Restart VSC and should be working. Alternatively, in the extenstions tab, you can type '@builtin emmet' to make sure the extension is enabled.
您需要检查此选项或放入
“ emmet.triggerexpansionontab”: settings.json 中的true
以使用emmet缩写按下。我意识到这是不起作用的:使用的示例: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: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
我也有同样的问题!不起作用。我找到了另一个执行相同操作的快捷方式:键入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.
看起来像一个错误,我对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
ordoc
meanwhile use "HTML:5"
enter image description here
or use "doc"
enter image description here
而@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是的,自最近更新以来,我也面临这个问题。
某种程度上我得到的解决方案是:
您可以选中“ 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.
在设置中添加文件关联对我有用:
Adding the file association in the settings worked for me: