comparison runtime/syntax/php.vim @ 10498:883396809b45

commit https://github.com/vim/vim/commit/bc2eada5424bff06f7eb77c032ecc067da52b846 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 2 21:27:47 2017 +0100 Updated runtime files.
author Christian Brabandt <cb@256bit.org>
date Mon, 02 Jan 2017 21:30:04 +0100
parents 46763b01cd9a
children cc5253681167
comparison
equal deleted inserted replaced
10497:4401e7bed2fe 10498:883396809b45
1 " Vim syntax file 1 " Vim syntax file
2 " Language: php PHP 3/4/5/7 2 " Language: php PHP 3/4/5/7
3 " Maintainer: Jason Woofenden <jason@jasonwoof.com> 3 " Maintainer: Jason Woofenden <jason@jasonwoof.com>
4 " Last Change: Jul 27, 2016 4 " Last Change: Dec 11, 2016
5 " URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD 5 " URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
6 " Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com> 6 " Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
7 " Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> 7 " Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
8 " 8 "
9 " Note: If you are using a colour terminal with dark background, you will probably find 9 " Note: If you are using a colour terminal with dark background, you will probably find
493 syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier 493 syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier
494 \ __construct __destruct __call __callStatic __get __set __isset __unset __sleep __wakeup __toString __invoke __set_state __clone __debugInfo 494 \ __construct __destruct __call __callStatic __get __set __isset __unset __sleep __wakeup __toString __invoke __set_state __clone __debugInfo
495 " Highlighting for __autoload slightly different from line above 495 " Highlighting for __autoload slightly different from line above
496 syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar 496 syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
497 \ __autoload 497 \ __autoload
498 highlight link phpSpecialFunction phpOperator 498 hi def link phpSpecialFunction phpOperator
499 499
500 " Highlighting for PHP5's built-in classes 500 " Highlighting for PHP5's built-in classes
501 " - built-in classes harvested from get_declared_classes() in 5.1.4 501 " - built-in classes harvested from get_declared_classes() in 5.1.4
502 syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar 502 syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
503 \ stdClass __PHP_Incomplete_Class php_user_filter Directory ArrayObject 503 \ stdClass __PHP_Incomplete_Class php_user_filter Directory ArrayObject
516 \ DOMImplementation DOMImplementationList DOMImplementationSource 516 \ DOMImplementation DOMImplementationList DOMImplementationSource
517 \ DOMNode DOMNameSpaceNode DOMDocumentFragment DOMDocument DOMNodeList DOMNamedNodeMap 517 \ DOMNode DOMNameSpaceNode DOMDocumentFragment DOMDocument DOMNodeList DOMNamedNodeMap
518 \ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler 518 \ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler
519 \ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity 519 \ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity
520 \ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath 520 \ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath
521 highlight link phpClasses phpFunctions 521 hi def link phpClasses phpFunctions
522 522
523 " Highlighting for PHP5's built-in interfaces 523 " Highlighting for PHP5's built-in interfaces
524 " - built-in classes harvested from get_declared_interfaces() in 5.1.4 524 " - built-in classes harvested from get_declared_interfaces() in 5.1.4
525 syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar 525 syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
526 \ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator 526 \ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator
527 \ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector 527 \ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector
528 highlight link phpInterfaces phpConstant 528 hi def link phpInterfaces phpConstant
529 529
530 " option defaults: 530 " option defaults:
531 if ! exists('php_special_functions') 531 if ! exists('php_special_functions')
532 let php_special_functions = 1 532 let php_special_functions = 1
533 endif 533 endif
551 endif 551 endif
552 552
553 if php_alt_assignByReference 553 if php_alt_assignByReference
554 " special highlighting for '=&' operator 554 " special highlighting for '=&' operator
555 syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle 555 syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle
556 highlight link phpAssignByRef Type 556 hi def link phpAssignByRef Type
557 endif 557 endif
558 558
559 if php_alt_comparisons 559 if php_alt_comparisons
560 " highlight comparison operators differently 560 " highlight comparison operators differently
561 syntax match phpComparison "\v[=!]\=\=?" contained containedin=phpRegion 561 syntax match phpComparison "\v[=!]\=\=?" contained containedin=phpRegion
563 563
564 " highlight the 'instanceof' operator as a comparison operator rather than a structure 564 " highlight the 'instanceof' operator as a comparison operator rather than a structure
565 syntax case ignore 565 syntax case ignore
566 syntax keyword phpComparison instanceof contained containedin=phpRegion 566 syntax keyword phpComparison instanceof contained containedin=phpRegion
567 567
568 hi link phpComparison Statement 568 hi def link phpComparison Statement
569 endif 569 endif
570 570
571 " ================================================================ 571 " ================================================================
572 572
573 " Sync 573 " Sync
643 hi def link phpInterpVarname Identifier 643 hi def link phpInterpVarname Identifier
644 hi def link phpTodo Todo 644 hi def link phpTodo Todo
645 hi def link phpDocTodo Todo 645 hi def link phpDocTodo Todo
646 hi def link phpMemberSelector Structure 646 hi def link phpMemberSelector Structure
647 if exists("php_oldStyle") 647 if exists("php_oldStyle")
648 hi phpIntVar guifg=Red ctermfg=DarkRed 648 hi def phpIntVar guifg=Red ctermfg=DarkRed
649 hi phpEnvVar guifg=Red ctermfg=DarkRed 649 hi def phpEnvVar guifg=Red ctermfg=DarkRed
650 hi phpOperator guifg=SeaGreen ctermfg=DarkGreen 650 hi def phpOperator guifg=SeaGreen ctermfg=DarkGreen
651 hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen 651 hi def phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
652 hi phpRelation guifg=SeaGreen ctermfg=DarkGreen 652 hi def phpRelation guifg=SeaGreen ctermfg=DarkGreen
653 hi phpIdentifier guifg=DarkGray ctermfg=Brown 653 hi def phpIdentifier guifg=DarkGray ctermfg=Brown
654 hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown 654 hi def phpIdentifierSimply guifg=DarkGray ctermfg=Brown
655 else 655 else
656 hi def link phpIntVar Identifier 656 hi def link phpIntVar Identifier
657 hi def link phpEnvVar Identifier 657 hi def link phpEnvVar Identifier
658 hi def link phpOperator Operator 658 hi def link phpOperator Operator
659 hi def link phpVarSelector Operator 659 hi def link phpVarSelector Operator
660 hi def link phpRelation Operator 660 hi def link phpRelation Operator
661 hi def link phpIdentifier Identifier 661 hi def link phpIdentifier Identifier
662 hi def link phpIdentifierSimply Identifier 662 hi def link phpIdentifierSimply Identifier
663 endif 663 endif
664 664
665 665
666 let b:current_syntax = "php" 666 let b:current_syntax = "php"
667 667