From f607d3bac1f82c32722e04a65da2ee1d77ef8bbd Mon Sep 17 00:00:00 2001 From: ujihisa Date: Sun, 3 Feb 2013 15:36:52 -0800 Subject: [PATCH] Improved php snippets. --- autoload/neosnippet/snippets/php.snip | 23 +++++++++++++++++++---- doc/neosnippet.txt | 3 +++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/autoload/neosnippet/snippets/php.snip b/autoload/neosnippet/snippets/php.snip index 0238b80..8522a68 100644 --- a/autoload/neosnippet/snippets/php.snip +++ b/autoload/neosnippet/snippets/php.snip @@ -1,14 +1,20 @@ snippet function -abbr function () {} +abbr public function () {} ${1:public }function ${2:#:FunctionName}(${3}) { ${4:TARGET} } +snippet function_literal +options word +abbr function () {} + function (${1})${2: use } { + ${3:TARGET} + } + snippet php snippet pecho ${0} @@ -109,11 +115,11 @@ snippet c * $0 */ -snippet class +snippet class_with_constructor /** * ${1} */ - class ${2:#:ClassName}${3:#:extends}} + class ${2:#:ClassName}${3:#:extends} { $5 function ${4:__construct}(${5:#:argument}) @@ -122,6 +128,11 @@ snippet class } } +snippet class + class ${2:#:ClassName} { + ${0:TARGET} + } + snippet def ${1}defined('${2}')${0} @@ -147,6 +158,10 @@ snippet if ${0:TARGET} } +snippet var_dump +options head + var_dump(${0:TARGET}); + snippet echo echo "${1:#:string}"${0}; diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 61a02d3..3c05164 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -718,6 +718,9 @@ A: Please try below settings. It defines snipMate function. ============================================================================== CHANGELOG *neosnippet-changelog* +2013-02-03 +- Improved php snippets. + 2013-02-01 - Added vim snippets.