デフォルトで用意されているvim/after/ftdetect/php_snippets.vimは、空白位置が変だったりしたのでPEARコーディング規約っぽく変更


if !exists('loaded_snippet') || &cp 
    finish
endif

let st = g:snip_start_tag
let et = g:snip_end_tag
let cd = g:snip_elem_delim

exec "Snippet reql require_once '".st."file".et."';".st.et
exec "Snippet req require '".st."file".et."';".st.et
exec "Snippet incll include_once '".st."file".et."' ;".st.et
exec "Snippet incl include '".st."file".et."' ;".st.et

exec "Snippet elseif elseif ( ".st."condition".et." ){".st.et."}".st.et
exec "Snippet do do{".st.et."} while ( ".st.":D('$a <= 10')".et." );".st.etexec "Snippet if? $".st."retVal".et." = ( ".st."condition".et." ) ? ".st."a".et." : ".st."b".et." ;".st.et
exec "Snippet switch switch ( ".st."variable".et." ){case '".st."value".et."':".st.et."break;".st.et."default:".st.et."break;}".st.etexec "Snippet class #doc#classname:".st."ClassName".et."#scope:".st."PUBLIC".et."##/docclass ".st."ClassName".et." ".st."extendsAnotherClass".et."{#internal variables#Constructorfunction __construct ( ".st."argument".et."){".st.et."}###}###".st.etexec "Snippet foreach foreach( $".st."variable".et." as $".st."key".et." => $".st."value".et." ){".st.et."}".st.etexec "Snippet ifelse if ( ".st."condition".et." ){".st.et."}else{".st.et."}".st.et
exec "Snippet $_G $_GET['".st."variable".et."']".st.et
exec "Snippet $_P $_POST['".st."variable".et."']".st.et

exec "Snippet case case '".st."variable".et."':".st.et."break;".st.et
exec "Snippet function ".st."public".et."function ".st."FunctionName".et." (".st.et."){".st.et."}".st.etexec "Snippet if if ( ".st."condition".et." ){".st.et."}".st.et
exec "Snippet else else{".st.et."}".st.et
exec "Snippet array $".st."arrayName".et." = array( '".st.et."',".st.et." );".st.et
exec "Snippet for for ( $".st."i".et."=".st.et."; $".st."i".et." < ".st.et."; $".st."i".et."++ ){ ".st.et."}".st.etexec "Snippet while while ( ".st.et." ){".st.et."}".st.et

以後はWikiの方で更新していきます