Skip to content

Commit

Permalink
Add some visual snippets
Browse files Browse the repository at this point in the history
For PHP and Javascript, adding some visual snippets (if, wh, try)
  • Loading branch information
Ala' Ibrahim committed Jul 9, 2015
1 parent 23bdbcb commit 9b13381
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions UltiSnips/javascript.snippets
Expand Up @@ -3,3 +3,23 @@ YUI().use(${1:modules}, function (Y) {
${0:${VISUAL:\/\/ Code Here}}
});
endsnippet

snippet if
if (${1:true}) {
${0:${VISUAL:\/\/ Code Here}}
}
endsnippet

snippet try
try {
${1:${VISUAL}}
} catch (${2:e}) {
${0:/* handle error */}
}
endsnippet

snippet wh
while (${1:/* condition */}) {
${0:${VISUAL}}
}
endsnippet
6 changes: 6 additions & 0 deletions UltiSnips/php.snippets
Expand Up @@ -3,3 +3,9 @@ header("Content-type: text/plain");
var_dump(${1:$variable});
exit;$2
endsnippet

snippet if "if"
if (${1:/* condition */}) {
${2:${VISUAL:\/\/ code...}}
}
endsnippet

0 comments on commit 9b13381

Please sign in to comment.