diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-05-05 17:15:44 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-05-05 17:15:44 +0000 |
commit | d5ab34bd5ecc748d5502f149c476968e5ec2b7c9 (patch) | |
tree | e3a3ac967a8c78dfa6d7eb47af1823ebd358a8bb /runtime/indent/php.vim | |
parent | 0630b8d96d12475cfa4457de9fc52e049323be94 (diff) |
updated for version 7.1a
Diffstat (limited to 'runtime/indent/php.vim')
-rw-r--r-- | runtime/indent/php.vim | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim index 0f79fd9d5b..8ba3b2ea19 100644 --- a/runtime/indent/php.vim +++ b/runtime/indent/php.vim @@ -2,9 +2,9 @@ " Language: PHP " Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr> " URL: http://www.2072productions.com/vim/indent/php.vim -" Last Change: 2006 Apr 30 +" Last Change: 2007 February 25th " Newsletter: http://www.2072productions.com/?to=php-indent-for-vim-newsletter.php -" Version: 1.23 +" Version: 1.24 " " The change log and all the comments have been removed from this file. " @@ -68,12 +68,6 @@ " NOTE: The script will be a bit slower if you use this option because " some optimizations won't be available. - - - - - - if exists("b:did_indent") finish endif @@ -137,7 +131,7 @@ endif let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$' let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!' -" setlocal debug=msg " XXX +"setlocal debug=msg " XXX function! GetLastRealCodeLNum(startline) " {{{ @@ -205,6 +199,9 @@ function! GetLastRealCodeLNum(startline) " {{{ if b:InPHPcode_and_script && !b:InPHPcode let b:InPHPcode_and_script = 0 endif + + + return lnum endfunction " }}} @@ -221,7 +218,7 @@ endfun function! Skippmatch() " {{{ let synname = synIDattr(synID(line("."), col("."), 0), "name") - if synname == "Delimiter" || synname == "phpParent" || synname == "javaScriptBraces" || synname == "phpComment" && b:UserIsTypingComment + if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname == "phpComment" && b:UserIsTypingComment return 0 else return 1 @@ -380,7 +377,7 @@ function! GetPhpIndent() endif if synname!="" - if synname != "phpHereDoc" + if synname != "phpHereDoc" && synname != "phpHereDocDelimiter" let b:InPHPcode = 1 let b:InPHPcode_tofind = "" @@ -448,7 +445,7 @@ function! GetPhpIndent() if b:InPHPcode - if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=="Delimiter" + if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter" if cline !~? s:PHP_startindenttag let b:InPHPcode = 0 let b:InPHPcode_tofind = s:PHP_startindenttag @@ -717,5 +714,3 @@ function! GetPhpIndent() let b:PHP_CurrentIndentLevel = ind return ind endfunction - -" vim: set ts=8 sw=4 sts=4: |