选择菜单 Tools -> new snippet...
<snippet>
<content><![CDATA[
some code write here ‘${1:highlight}‘
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>tt</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.php</scope> -->
</snippet>
可以通过设置快捷键快速显示,如上,输入tt后按tab键即可显示出来,或选择菜单Tools -> Snippets... 在列表里选择
保存时存放在\Packages\User目录下,后缀名必须为 .sublime-snippet
原文地址:http://pdoctor.blog.51cto.com/2125522/1844916