sublime 3 使用Snippets创建代码片段
选择菜单 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
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。