Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated snippets.

  • Loading branch information...
commit 0fe6459c4fdd9f76b6f766b54ea60c27ce70211b 1 parent 787f0ca
@jeffbuttars authored
Showing with 19 additions and 1 deletion.
  1. +15 −1 UltiSnips/javascript.snippets
  2. +4 −0 UltiSnips/sh.snippets
View
16 UltiSnips/javascript.snippets
@@ -25,7 +25,7 @@ if (! window.${1:nsname} ) {
}$0
endsnippet
-snippet af "Anonymous Function"
+snippet af "Anonymous Function" i
function(${1:args}) {${2}}${3}
endsnippet
@@ -67,3 +67,17 @@ endsnippet
snippet cl "console.log()"
console.log($1);$0
endsnippet
+
+snippet req "require('');"
+require("${1}");$0
+endsnippet
+
+snippet vreq "var name = require('');"
+var ${1} = require('${2:$1}');$0
+endsnippet
+
+snippet fori "for key in"
+for (var ${1:key} in ${2:obj}) { if ($2.hasOwnProperty(key)) {
+ ${3:obj[key]};$0
+}}
+endsnippet
View
4 UltiSnips/sh.snippets
@@ -20,3 +20,7 @@ for ${1:needle} in ${2:haystack} ; do
${3:#statements}
done
endsnippet
+
+snippet tdir "THIS_DIR"
+THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+endsnippet
Please sign in to comment.
Something went wrong with that request. Please try again.