Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

Commit 9f2d8fb

Browse files
committed
Post-process syntax for Vim 7.3.
1 parent c6f9187 commit 9f2d8fb

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

syntax/php.vim

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"
44
" {{{ BLOCK: Last-modified
55

6-
" Tue, 06 Feb 2018 11:24:44 +0000, PHP 7.2.2-1+ubuntu14.04.1+deb.sury.org+1
6+
" Mon, 09 Apr 2018 08:49:14 +0000, PHP 7.2.2-1+ubuntu14.04.1+deb.sury.org+1
77

88
" }}}
99
"
@@ -668,6 +668,16 @@ if version >= 704
668668
" @end phpHereDoc
669669
else
670670
" @copy phpHereDoc strip_maximum_size
671+
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
672+
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
673+
" including HTML,JavaScript,SQL if enabled via options
674+
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
675+
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
676+
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
677+
endif
678+
if (exists("php_sql_heredoc") && php_sql_heredoc)
679+
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
680+
endif
671681
" @end phpHereDoc
672682
endif
673683

@@ -686,6 +696,16 @@ if version >= 704
686696
" @end phpNowDoc
687697
else
688698
" @copy phpHereDoc strip_maximum_size
699+
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
700+
SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
701+
" including HTML,JavaScript,SQL if enabled via options
702+
if (exists("php_html_in_heredoc") && php_html_in_heredoc)
703+
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
704+
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
705+
endif
706+
if (exists("php_sql_heredoc") && php_sql_heredoc)
707+
SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
708+
endif
689709
" @end phpNowDoc
690710
endif
691711

0 commit comments

Comments
 (0)