From 50c68ed00a63702cedeca4703c30094eb26b9017 Mon Sep 17 00:00:00 2001 From: George Lee Date: Sat, 7 Apr 2012 20:33:16 +0800 Subject: [PATCH] added a few inline snippets for templating --- snippets/php.snippets | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/snippets/php.snippets b/snippets/php.snippets index 9586d21..da2d482 100644 --- a/snippets/php.snippets +++ b/snippets/php.snippets @@ -170,6 +170,10 @@ snippet if if (${1:/* condition */}) { ${2:// code...} } +snippet ifil + + ${2:} + snippet ife if (${1:/* condition */}) { ${2:// code...} @@ -177,6 +181,13 @@ snippet ife ${3:// code...} } ${4} +snippet ifeil + + ${2:} + + ${3:} + + ${4} snippet else else { ${1:// code...} @@ -210,10 +221,18 @@ snippet foreach foreach ($${1:variable} as $${2:value}) { ${3:// code...} } +snippet foreachil + + ${3:} + snippet foreachk foreach ($${1:variable} as $${2:key} => $${3:value}) { ${4:// code...} } +snippet foreachkil + $${3:value}): ?> + ${4:} + snippet fun ${1:public }function ${2:FunctionName}(${3}) {