Skip to content

Instantly share code, notes, and snippets.

@mmisono
Created January 21, 2010 15:22
Show Gist options
  • Save mmisono/282871 to your computer and use it in GitHub Desktop.
Save mmisono/282871 to your computer and use it in GitHub Desktop.
snippet :f
${1:method_name}: function(${2:attribute}){
${0}
}
snippet func
function ${1:function_name} (${2:argument}) {
${0:// body...}
}
snippet proto
${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {
${0:// body...}
};
snippet f
function(${1}) {${0:$TM_SELECTED_TEXT}};
snippet if
if (${1:true}) {${0:$TM_SELECTED_TEXT}};
snippet ife
if (${1:true}) {${0:$TM_SELECTED_TEXT}} else{};
snippet for
for (var ${2:i}=0; ${2:i} < ${1:Things}.length; ${2:i}++) {
${0}
};
snippet ;,
${1:value_name}:${0:value},
snippet key
${1:key}: "${2:value}"}${3:, }
snippet timeout
setTimeout(function() {${0}}${2:}, ${1:10});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment