2012-02-02 04:33:35 +00:00
|
|
|
snippet :f
|
2012-10-26 01:46:05 +00:00
|
|
|
options head
|
2012-10-30 08:53:14 +00:00
|
|
|
${1:#:method_name}: function(${2:#:attribute}) {
|
|
|
|
${0:TARGET}
|
2012-09-27 02:02:30 +00:00
|
|
|
}
|
2012-02-02 04:33:35 +00:00
|
|
|
|
2012-10-26 01:46:05 +00:00
|
|
|
snippet function
|
2013-05-31 02:33:05 +00:00
|
|
|
abbr func
|
2012-10-26 01:54:21 +00:00
|
|
|
options word
|
2012-10-30 08:53:14 +00:00
|
|
|
function ${1:#:function_name}(${2:#:argument}) {
|
|
|
|
${0:TARGET}
|
2012-09-27 02:02:30 +00:00
|
|
|
}
|
2012-02-02 04:33:35 +00:00
|
|
|
|
2013-05-31 02:33:05 +00:00
|
|
|
snippet function2
|
|
|
|
abbr func2
|
|
|
|
options head
|
|
|
|
function ${1:function_name}(${2:argument}) {
|
|
|
|
${0:TARGET}
|
|
|
|
}
|
|
|
|
|
2012-02-02 04:33:35 +00:00
|
|
|
snippet proto
|
2012-10-26 01:46:05 +00:00
|
|
|
options head
|
2012-10-30 08:53:14 +00:00
|
|
|
${1:#:class_name}.prototype.${2:#:method_name} = function(${3:#:first_argument}) {
|
|
|
|
${0:TARGET}
|
2012-09-27 02:02:30 +00:00
|
|
|
};
|
2012-02-02 04:33:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
snippet f
|
2012-10-25 16:00:07 +00:00
|
|
|
options word
|
2012-10-30 08:53:14 +00:00
|
|
|
function(${1}) { ${0:TARGET} };
|
2012-02-02 04:33:35 +00:00
|
|
|
|
|
|
|
snippet if
|
2012-10-26 01:46:05 +00:00
|
|
|
options head
|
2012-09-27 02:02:30 +00:00
|
|
|
if (${1:true}) {
|
2012-10-30 08:53:14 +00:00
|
|
|
${0:TARGET}
|
2012-09-27 02:02:30 +00:00
|
|
|
}
|
2012-02-02 04:33:35 +00:00
|
|
|
|
2013-05-31 02:33:05 +00:00
|
|
|
snippet if-else
|
|
|
|
abbr ife
|
2012-10-26 01:46:05 +00:00
|
|
|
options head
|
2012-10-30 08:53:14 +00:00
|
|
|
if (${1:#:condition}) {
|
|
|
|
${0:TARGET}
|
2012-09-27 02:02:30 +00:00
|
|
|
} else {
|
|
|
|
}
|
2012-02-02 04:33:35 +00:00
|
|
|
|
|
|
|
snippet for
|
2012-10-26 01:46:05 +00:00
|
|
|
options head
|
2013-05-31 02:33:05 +00:00
|
|
|
for (var ${1:i}=0; $1 < ${2:#:Things}.length; ++$1) {
|
2012-10-30 08:53:14 +00:00
|
|
|
${0:TARGET}
|
2012-09-27 02:02:30 +00:00
|
|
|
}
|
2012-02-02 04:33:35 +00:00
|
|
|
|
|
|
|
snippet forin
|
2012-10-26 01:46:05 +00:00
|
|
|
options head
|
2013-05-31 02:33:05 +00:00
|
|
|
for (var ${1:i} in ${2:#:Things}) {
|
2012-10-30 08:53:14 +00:00
|
|
|
${0:TARGET}
|
2013-07-12 02:56:07 +00:00
|
|
|
}
|
2012-02-02 04:33:35 +00:00
|
|
|
|
2013-05-31 02:33:05 +00:00
|
|
|
snippet key-value
|
|
|
|
abbr :,
|
2012-10-26 01:46:05 +00:00
|
|
|
options word
|
2013-05-31 02:33:05 +00:00
|
|
|
${1:#:value_name}: ${0:#:value},
|
2012-02-02 04:33:35 +00:00
|
|
|
|
2013-05-31 02:33:05 +00:00
|
|
|
#snippet key
|
|
|
|
#options word
|
|
|
|
# ${1:#:key}: "${2:#:value}"}${3:, }
|
2012-02-02 04:33:35 +00:00
|
|
|
|
2013-05-31 02:33:05 +00:00
|
|
|
snippet setTimeout-function
|
2012-10-26 01:55:12 +00:00
|
|
|
options head
|
2013-08-28 02:31:11 +00:00
|
|
|
setTimeout(function() { ${0} }, ${1:10});
|
2013-08-28 04:09:11 +00:00
|
|
|
|
|
|
|
snippet cl
|
|
|
|
options head
|
|
|
|
console.log(${0:#:output});
|