From 02160ecee14d759297b3e4db2fdbad7a1caffd30 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Thu, 31 May 2012 11:23:21 -0400 Subject: [PATCH] JS whitespace style --- snippets/javascript.snippets | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/snippets/javascript.snippets b/snippets/javascript.snippets index de50a0c..1282f73 100644 --- a/snippets/javascript.snippets +++ b/snippets/javascript.snippets @@ -11,12 +11,12 @@ snippet fun } # Anonymous Function snippet f - function(${1}) { + function (${1}) { ${3} }${2:;} # Immediate function snippet (f - (function(${1}) { + (function (${1}) { ${3:/* code */} }(${2})); # if @@ -36,7 +36,7 @@ snippet t ${1:/* condition */} ? ${2:a} : ${3:b} # switch snippet switch - switch(${1:expression}) { + switch (${1:expression}) { case '${3:case}': ${4:// code} break; @@ -69,7 +69,7 @@ snippet wh snippet try try { ${1:/* code */} - } catch(${2:e}) { + } catch (${2:e}) { ${3:/* handle error */} } # do...while @@ -79,12 +79,12 @@ snippet do } while (${1:/* condition */}); # Object Method snippet :f - ${1:method_name}: function(${2:attribute}) { + ${1:method_name}: function (${2:attribute}) { ${4} }${3:,} # setTimeout function snippet timeout - setTimeout(function() {${3}}${2}, ${1:10}); + setTimeout(function () {${3}}${2}, ${1:10}); # Get Elements snippet get getElementsBy${1:TagName}('${2}')${3}