Bug 118668

Summary: vim-like syntax highlighting support for heredocs in php.xml
Product: [Applications] kate Reporter: Torsten Grote <grote>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: bob53181
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Torsten Grote 2005-12-19 23:06:18 UTC
Version:            (using KDE KDE 3.4.3)
Installed from:    Gentoo Packages
OS:                Linux

Heredocs in php files are currently supported by simply coloring all text inside a heredoc red.
In vim you get syntax highlighting for HTML, SQL and JavaScript *inside* a heredoc if you use EOHTML, EOSQL and EOJAVASCRIPT for starting the herdoc part.
Here is an example:

echo <<<EOHTML
<div>this html-code should be properly colored</div>
EOHTML;

Having correct syntax highlighting for code inside php heredocs depending on the heredoc identifier (f.ex. EOHTML) would be great.
Comment 1 Milian Wolff 2009-08-26 14:26:59 UTC
SVN commit 1015836 by mwolff:

use JavaScript, HTML, MySQL or CSS highlighting in heredocs with fitting identifiers,
e.g. EOHTML or just HTML.

BUG: 118668

 M  +34 -1     php.xml  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1015836
Comment 2 bob53181 2014-08-13 22:11:53 UTC
Shouldn't Kate support SQL as an alias to MySQL?
For example,
<RegExpr attribute="Backslash Code" context="mysqlheredoc" String="&lt;&lt;&lt;((EO)?(MY)?SQL)\b" />
instead of
<RegExpr attribute="Backslash Code" context="mysqlheredoc" String="&lt;&lt;&lt;((EO)?MYSQL)\b" />