求助sublime snippet

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

 

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

 

旧代码如下:

{
   "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

转载请注明出处
水平有限,错误在所难免,抛砖引玉,意在交流学习
posted @ 2016-11-25 10:25  翰弟  阅读(368)  评论(6编辑  收藏  举报