X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=php.vim;h=956197d147202152eca272adc5746f6ce5ec4814;hb=f0245bc4897ab12f1a3108c437a8e6217303efd0;hp=0d4342b1da6d01dfd6aa192906442f9b4672cbaf;hpb=12c32c391a7c346a90898f38dc82e110c493074f;p=vim-syntax.git diff --git a/php.vim b/php.vim index 0d4342b..956197d 100644 --- a/php.vim +++ b/php.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: php PHP 3/4/5 " Maintainer: Jason Woofenden -" Last Change: July 29, 2011 +" Last Change: Oct 20, 2011 " URL: https://gitorious.org/jasonwoof/vim-syntax/blobs/master/php.vim " Former Maintainers: Peter Hodge " Debian VIM Maintainers @@ -110,6 +110,10 @@ if exists( "php_htmlInStrings") syn cluster phpAddStrings add=@htmlTop endif +" make sure we can use \ at the begining of the line to do a continuation +let s:cpo_save = &cpo +set cpo&vim + syn case match " Env Variables @@ -297,10 +301,10 @@ syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contai " Interpolated indentifiers (inside strings) syn match phpBrackets "[][}{]" contained display " errors - syn match phpInterpSimpleError "\[[^]]*\]" contained display + syn match phpInterpSimpleError "\[[^]]*\]" contained display " fallback (if nothing else matches) syn match phpInterpSimpleError "->[^a-zA-Z_]" contained display " make sure these stay above the correct DollarCurlies so they don't take priority - syn match phpInterpBogusDollarCurley "${.*}" contained display + syn match phpInterpBogusDollarCurley "${[^}]*}" contained display " fallback (if nothing else matches) syn match phpinterpSimpleBracketsInner "\w\+" contained syn match phpInterpSimpleBrackets "\[\h\w*]" contained contains=phpBrackets,phpInterpSimpleBracketsInner syn match phpInterpSimpleBrackets "\[\d\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner @@ -691,4 +695,8 @@ if main_syntax == 'php' unlet main_syntax endif +" put cpoptions back the way we found it +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: ts=8 sts=2 sw=2 expandtab