Visual Studio Code 中的 Emmet 有问题 [英] Something is wrong with Emmet in Visual Studio Code

查看:32
本文介绍了Visual Studio Code 中的 Emmet 有问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在上次更新后,Emmet 的工作方式有所不同(不正确).

After the last update, Emmet is working in some different (incorrect) way.

如果我在 Emmet 语法中输入常用代码,例如:

If I'm typing usual code in Emmet syntax like:

.row>.col*2

然后按 Tab 它不起作用.

and press Tab it's not working.

如果我输入:

h1{Some title}

然后按 Tab 它也不起作用,但是如果我将光标放在括号内,然后按 Tab - 在这种情况下它会起作用.

and press Tab it's also not working, but if I put the cursor inside brackets, and then press Tab — in this case it's going to work.

这是我的 Visual Studio Code 配置:

This is my Visual Studio Code configuration:

"editor.fontSize": 12,
"editor.wordWrap": "on",
"editor.wrappingIndent": "indent",
"editor.minimap.enabled": true,
"workbench.iconTheme": "material-icon-theme",
"window.zoomLevel": 0,
"window.openFilesInNewWindow": "off",
"window.openFoldersInNewWindow": "on",
"workbench.welcome.enabled": false,
"workbench.colorTheme": "Default Light+",
"[stylus]": {
    "editor.quickSuggestions": {
        "other": false,
        "comments": false,
        "strings": false
    }
},
"emmet.preferences": {
    "stylus.valueSeparator": ": "
},
"git.enableSmartCommit": true

我该如何解决?

推荐答案

从 1.15.1 版开始,这对我有用:

As of version 1.15.1 this worked for me:

打开您的首选项并添加

emmet.triggerExpansionOnTab":真

Tab 似乎不再与 Emmet 相关联.

It seems Tab is no longer associated with Emmet.

如果您使用的是 v1.33.0 或更新版本,您还可以打开首选项并输入诸如 trigger expand 之类的内容,现在这只是一个简单的切换.当然,您仍然可以在 settings.json 文件中执行上述操作.

If you are on v1.33.0 or newer, you can also open up the preferences and type in something like trigger expansion and it's just a simple toggle now. Of course, you can still do the above in the settings.json file as well.

这篇关于Visual Studio Code 中的 Emmet 有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆