Skip to content

Commit

Permalink
Comment out the heredoc/nowdoc from the temp buffer syntax file for s…
Browse files Browse the repository at this point in the history
…peed

See #109
  • Loading branch information
David Szabo committed Apr 13, 2018
1 parent 577f21f commit af2bfe6
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions syntax/phpcompletetempbuffer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,22 @@ syn region phpBacktick matchgroup=phpStringDelimiter start=+`+ skip=+\\\\\|\\"+
syn region phpStringSingle matchgroup=phpStringDelimiter start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=phpStrEsc contained keepend extend

" HereDoc
syn case match
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
" including HTML,JavaScript,SQL even if not enabled via options
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
syn case ignore
" syn case match
" syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
" syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
" " including HTML,JavaScript,SQL even if not enabled via options
" syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
" syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
" syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=phpSpecialChar,phpStrEsc keepend extend
" syn case ignore

" NowDoc
syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@<='\z(\I\i*\)'$+ end="^\z1\(;\=$\)\@=" contained keepend extend
" syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@<='\z(\I\i*\)'$+ end="^\z1\(;\=$\)\@=" contained keepend extend

" Clusters
syn cluster phpClConst contains=phpStringSingle,phpStringDouble,phpBacktick
syn cluster phpClInside contains=@phpClConst,phpComment,phpDocComment,phpHereDoc,phpNowDoc
syn cluster phpClInside contains=@phpClConst,phpComment,phpDocComment
",phpHereDoc,phpNowDoc

syn region phpRegion matchgroup=Delimiter start="<?\(php\)\=" end="?>" contains=@phpClInside keepend

Expand Down

0 comments on commit af2bfe6

Please sign in to comment.