Skip to content

Commit b9b2b2d

Browse files
committed
Make highlighting of PHP superglobals work.
1 parent e3333be commit b9b2b2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

syntax/php.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim syntax file
22
" Language: PHP 5.3 & up
33
" Maintainer: Paul Garvin <paul@paulgarvin.net>
4-
" Last Change: April 2, 2010
4+
" Last Change: October 12, 2012
55
" URL:
66
"
77
" Former Maintainer: Peter Hodge <toomuchphp-vim@yahoo.com>
@@ -59,7 +59,7 @@ if !exists("main_syntax")
5959
let main_syntax = 'php'
6060
endif
6161

62-
runtime! syntax/html.vim
62+
runtime syntax/html.vim
6363
unlet! b:current_syntax
6464
" HTML syntax file turns on spelling for all top level words, we attempt to turn off
6565
syntax spell default
@@ -466,7 +466,7 @@ syn match phpVarSelector "\$" contained display
466466
syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display containedin=phpStringDouble
467467

468468
" Identifier
469-
syn match phpIdentifier "$\h\w*" contained contains=phpEnvVar,phpIntVar,phpVarSelector display
469+
syn match phpIdentifier "$\h\w*" contained contains=phpSuperglobals,phpVarSelector display
470470
syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contained display
471471
syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierArray contained extend
472472
syn region phpIdentifierArray matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained
@@ -620,7 +620,7 @@ endif
620620
if !exists("did_php_syn_inits")
621621

622622
hi def link phpComment Comment
623-
hi def link phpSuperglobals Constant
623+
hi def link phpSuperglobals Type
624624
hi def link phpMagicConstants Constant
625625
hi def link phpServerVars Constant
626626
hi def link phpConstants Constant

0 commit comments

Comments
 (0)