gpt4 book ai didi

visual-studio-code - 是否可以在 VSC 中编辑内置的 Emmet 缩写?

转载 作者:行者123 更新时间:2023-12-04 12:02:01 25 4
gpt4 key购买 nike

我希望能够编辑“!”的默认行为而不是创建我自己的“!”版本从头开始。
是否可以在 VSC 中编辑(调整)Emmet 缩写的默认行为?

最佳答案

是的!从文档:

Custom Emmet snippets need to be defined in a json file named snippets.json. The emmet.extensionsPath setting should have the path to the directory containing this file.

{
"html": {
"snippets": {
"ull": "ul>li[id=${1} class=${2}]*2{ Will work with html, pug, haml and slim }",
"oll": "<ol><li id=${1} class=${2}> Will only work in html </ol>",
"ran": "{ Wrap plain text in curly braces }"
}
},
"css": {
"snippets": {
"cb": "color: black",
"bsd": "border: 1px solid ${1:red}",
"ls": "list-style: ${1}"
}
}
}
More info here.
您还可以使用 filters 修改现有块.

关于visual-studio-code - 是否可以在 VSC 中编辑内置的 Emmet 缩写?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67900685/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com