neosnippet.vim/autoload/neosnippet/snippets/javascript.snip

62 lines
939 B
Plaintext
Raw Normal View History

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-02-02 04:33:35 +00:00
2012-10-26 01:46:05 +00:00
snippet function
alias func
options word
2012-10-30 08:53:14 +00:00
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-02-02 04:33:35 +00:00
snippet f
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
if (${1:true}) {
2012-10-30 08:53:14 +00:00
${0:TARGET}
}
2012-02-02 04:33:35 +00:00
snippet ife
2012-10-26 01:46:05 +00:00
options head
2012-10-30 08:53:14 +00:00
if (${1:#:condition}) {
${0:TARGET}
} else {
}
2012-02-02 04:33:35 +00:00
snippet for
2012-10-26 01:46:05 +00:00
options head
2012-10-30 08:53:14 +00:00
for (var ${2:i}=0; $2 < ${1:#:Things}.length; $2++) {
${0:TARGET}
}
2012-02-02 04:33:35 +00:00
snippet forin
2012-10-26 01:46:05 +00:00
options head
2012-10-30 08:53:14 +00:00
for (var ${2:i} in ${1:#:Things}) {
${0:TARGET}
};
2012-02-02 04:33:35 +00:00
snippet ;,
2012-10-26 01:46:05 +00:00
options word
2012-10-30 08:53:14 +00:00
${1:#:value_name}:${0:#:value},
2012-02-02 04:33:35 +00:00
snippet key
2012-10-26 01:46:05 +00:00
options word
2012-10-30 08:53:14 +00:00
${1:#:key}: "${2:#:value}"}${3:, }
2012-02-02 04:33:35 +00:00
snippet timeout
options head
setTimeout(function() {${0}}${2:}, ${1:10});
2012-10-26 01:46:05 +00:00