1、if_else
快捷输入:ie+tab
<snippet>
<content><![CDATA[
if (${1}) {
${2}
} else {
${3}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>ie</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
2、绑定到事件的函数。
<snippet>
<content><![CDATA[
function() {
${1}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>eventFunction</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
3、定义一个function
<snippet>
<content><![CDATA[
function ${1:函数名称}(${2}){
${3}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>function</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>