Skip to content

Commit

Permalink
updated snippets.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbuttars committed Sep 20, 2012
1 parent 787f0ca commit 0fe6459
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 15 additions & 1 deletion UltiSnips/javascript.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
4 changes: 4 additions & 0 deletions UltiSnips/sh.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0fe6459

Please sign in to comment.