note 69014 modified in language.types.string by colder
| From: | colder@php.net | Date: | Tue, 17 Oct 2006 18:36:58 +0000 |
| Subject: | note 69014 modified in language.types.string by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-118655@lists.php.net to get a copy of this message | ||
When editing with Dreamweaver, the syntax higlighting will be messed up if you use heredoc syntax. I
found that the color syntaxing can be taken care by editing the php syntax file for DW.
Open Macromedia\Dreamweaver 8\Configuration\CodeColoring\PHP.xml and look for:
<blockStart doctypes="PHP_MySQL"
scheme="customText"><![CDATA[<?=]]></blockStart>
<blockEnd><![CDATA[?>]]></blockEnd>
Directly after that add:
<blockStart doctypes="PHP_MySQL"
scheme="customText"><![CDATA[EOF;]]></blockStart>
<blockEnd><![CDATA[<<<EOF]]></blockEnd>
Now, DW will treat <<<EOF as if it was the end of the php syntax block (?>) and EOF; as
it was the start (<?php or <?). I have yet to figure out how to make it work dynamically with
any heredoc identifier. DW uses some regex in that file but it appears as if some are disabled. If
anyone else happens to figure it out please share! :D
--was--
In response to kamermans at teratechnologies dot net:
That is a very sloppy method. I happen to be looking to do the same thing with DW today and came
here to see the syntax rules on heredoc. I found that the color syntaxing can be taken care by
editing the php syntax file for DW.
Open Macromedia\Dreamweaver 8\Configuration\CodeColoring\PHP.xml and look for:
<blockStart doctypes="PHP_MySQL"
scheme="customText"><![CDATA[<?=]]></blockStart>
<blockEnd><![CDATA[?>]]></blockEnd>
Directly after that add:
<blockStart doctypes="PHP_MySQL"
scheme="customText"><![CDATA[EOF;]]></blockStart>
<blockEnd><![CDATA[<<<EOF]]></blockEnd>
Now, DW will treat <<<EOF as if it was the end of the php syntax block (?>) and EOF; as
it was the start (<?php or <?). I have yet to figure out how to make it work dynamically with
any heredoc identifier. DW uses some regex in that file but it appears as if some are disabled. If
anyone else happens to figure it out please share! :D
http://php.net/manual/en/language.types.string.php