62 lines
926 B
Plaintext
62 lines
926 B
Plaintext
snippet :f
|
|
options head
|
|
${1:method_name}: function(${2:attribute}) {
|
|
${0}
|
|
}
|
|
|
|
snippet function
|
|
alias func
|
|
options word
|
|
function ${1:function_name}(${2:argument}) {
|
|
${0:// body...}
|
|
}
|
|
|
|
snippet proto
|
|
options head
|
|
${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {
|
|
${0:// body...}
|
|
};
|
|
|
|
|
|
snippet f
|
|
options word
|
|
function(${1}) { ${0:$TM_SELECTED_TEXT} };
|
|
|
|
snippet if
|
|
options head
|
|
if (${1:true}) {
|
|
${0:$TM_SELECTED_TEXT}
|
|
}
|
|
|
|
snippet ife
|
|
options head
|
|
if (${1:true}) {
|
|
${0:$TM_SELECTED_TEXT}
|
|
} else {
|
|
}
|
|
|
|
snippet for
|
|
options head
|
|
for (var ${2:i}=0; $2 < ${1:Things}.length; $2++) {
|
|
${0}
|
|
}
|
|
|
|
snippet forin
|
|
options head
|
|
for (var ${2:i} in ${1:Things}) {
|
|
${0}
|
|
};
|
|
|
|
snippet ;,
|
|
options word
|
|
${1:value_name}:${0:value},
|
|
|
|
snippet key
|
|
options word
|
|
${1:key}: "${2:value}"}${3:, }
|
|
|
|
snippet timeout
|
|
options head
|
|
setTimeout(function() {${0}}${2:}, ${1:10});
|
|
|