diff --git a/UltiSnips/html.snippets b/UltiSnips/html.snippets index 1cb86b2..1121190 100644 --- a/UltiSnips/html.snippets +++ b/UltiSnips/html.snippets @@ -277,4 +277,24 @@ snippet movie "Embed QT movie (movie)" b endsnippet +snippet html5 "HTML5 Template" + + + + ${1} + + + +
+ ${2} +
+ + ${3} + + + + +endsnippet # vim:ft=snippets: diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets index 5a89ccb..40461d2 100644 --- a/UltiSnips/php.snippets +++ b/UltiSnips/php.snippets @@ -111,9 +111,9 @@ snippet setter "PHP Class Setter" !b public function set${1/\w+\s*/\u$0/}($$1) { $this->$1 = $$1;$3 - return $this; + ${4:return $this;} } -$4 +$0 endsnippet snippet gs "PHP Class Getter Setter" !b @@ -133,70 +133,78 @@ public function get${1/\w+\s*/\u$0/}() public function set${1/\w+\s*/\u$0/}($$1) { $this->$1 = $$1;$3 - return $this; + ${4:return $this;} } -$4 +$0 endsnippet snippet pub "Public function" !b public function ${1:name}(${2:$param}) { - ${3:return null;} + ${VISUAL}${3:return null;} } +$0 endsnippet snippet pro "Protected function" !b protected function ${1:name}(${2:$param}) { - ${3:return null;} + ${VISUAL}${3:return null;} } +$0 endsnippet snippet pri "Private function" !b private function ${1:name}(${2:$param}) { - ${3:return null;} + ${VISUAL}${3:return null;} } +$0 endsnippet snippet pubs "Public static function" !b public static function ${1:name}(${2:$param}) { - ${3:return null;} + ${VISUAL}${3:return null;} } +$0 endsnippet snippet pros "Protected static function" !b protected static function ${1:name}(${2:$param}) { - ${3:return null;} + ${VISUAL}${3:return null;} } +$0 endsnippet snippet pris "Private static function" !b private static function ${1:name}(${2:$param}) { - ${3:return null;} + ${VISUAL}${3:return null;} } +$0 endsnippet snippet fu "Function snip" !b function ${1:name}(${2:$param}) { - ${3:return null;} + ${VISUAL}${3:return null;} } +$0 endsnippet # :vim:ft=snippets snippet fore "Foreach loop" foreach ($${1:variable} as $${3:value}){ - ${4:// code...} + ${VISUAL}${4} } +$0 endsnippet snippet new "New class instance" !b $$1 = new $1($2); -$3 +$0 endsnippet @@ -206,6 +214,7 @@ if (${1:/* condition */}) { } else { ${3:// code...} } +$0 endsnippet @@ -221,14 +230,29 @@ class $1 ${4:// code} } } +$0 endsnippet -snippet pr "Demb debug helper in HTML" -echo '
' . var_export($1, 1) . '
'; +snippet pr "Dumb debug helper in HTML" +echo '
' . var_export($1, 1) . '
';$0 endsnippet snippet pc "Dumb debug helper in cli" -var_export($1); +var_export($1);$0 +endsnippet + +# Symfony 2 based snippets +snippet sfa "Symfony 2 Controller action" +/** +* @Route("/${1:route_name}", name="$1") +* @Template() +*/ +public function $1Action($2) +{ + $3 + return ${4:array();}$0 +} endsnippet # :vim:ft=snippets: +