JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
php: add E_DEPRECATED, E_RECOVERABLE_ERROR, E_USER_DEPRECATED
authorDaniel Hahler <git@thequod.de>
Fri, 12 Sep 2014 14:53:19 +0000 (16:53 +0200)
committerDaniel Hahler <git@thequod.de>
Fri, 12 Sep 2014 14:53:19 +0000 (16:53 +0200)
Also move E_STRICT to the new section for predefined constants.

php.vim

diff --git a/php.vim b/php.vim
index f27d923..6791616 100644 (file)
--- a/php.vim
+++ b/php.vim
@@ -123,7 +123,11 @@ syn keyword phpEnvVar GATEWAY_INTERFACE SERVER_NAME SERVER_SOFTWARE SERVER_PROTO
 syn keyword phpIntVar GLOBALS PHP_ERRMSG PHP_SELF HTTP_GET_VARS HTTP_POST_VARS HTTP_COOKIE_VARS HTTP_POST_FILES HTTP_ENV_VARS HTTP_SERVER_VARS HTTP_SESSION_VARS HTTP_RAW_POST_DATA HTTP_STATE_VARS _GET _POST _COOKIE _FILES _SERVER _ENV _SERVER _REQUEST _SESSION  contained
 
 " Constants
-syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_ALL  contained
+syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END contained
+
+" Predefined constants
+" Generated by: curl -q http://php.net/manual/en/errorfunc.constants.php | grep -oP 'E_\w+' | sort -u
+syn keyword phpCoreConstant E_ALL E_COMPILE_ERROR E_COMPILE_WARNING E_CORE_ERROR E_CORE_WARNING E_DEPRECATED E_ERROR E_NOTICE E_PARSE E_RECOVERABLE_ERROR E_STRICT E_USER_DEPRECATED E_USER_ERROR E_USER_NOTICE E_USER_WARNING E_WARNING contained
 
 syn case ignore
 
@@ -502,11 +506,6 @@ syn keyword phpStructure trait
 " Some of these changes (highlighting isset/unset/echo etc) are not so
 " critical, but they make things more colourful. :-)
 
-" highlight constant E_STRICT
-syntax case match
-syntax keyword phpCoreConstant E_STRICT contained
-syntax case ignore
-
 " different syntax highlighting for 'echo', 'print', 'switch', 'die' and 'list' keywords
 " to better indicate what they are.
 syntax keyword phpDefine echo print contained