求助sublime snippet

时间:2023-03-09 08:51:08
求助sublime snippet

单个文件多个snippets不能生效?求助!(已解决)

文件保存路径:F:\work\sublime\Data\Packages\User\completions\xp.sublime-completions

求助sublime snippet

旧代码如下:

{
"scope": "source.js", "completions":
[
{ "trigger": "xpc1", "hack\nhack..." },
{ "trigger": "xpc2", "hack" },
{ "trigger": "xpc3", "hack" }
]
}

新代码如下:

{
"scope": "source.js",
"completions":
[
{ "trigger": "co", "contents": "console.log(${1});" },
{ "trigger": "con", "contents": "console.log('${1}', ${1});" }
]
}

参考:http://blog.useasp.net/archive/2015/11/30/sublime-text-create-multiple-snippets-in-one-file.aspx