I guess many people who use Dreamweaver as text editor for Laravel Blade will face the problem of unsupported code / syntax coloring. Without code coloring, the coding is hard to read. Therefore, I decided to do some "hacking" on dreamweaver to get the code coloring works with Laravel Blade.
To do that, you need to go to C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS6\configuration\CodeColoring folder. Then, edit the php.xml file.
Add the following under the CodeColor_PHPScriptBlock
<blockStart doctypes="PHP_MySQL" scheme="customText"><![CDATA[{{]]></blockStart>
<blockEnd><![CDATA[}}]]></blockEnd>
<blockStart doctypes="PHP_MySQL" scheme="customText"><![CDATA[{{{]]></blockStart>
<blockEnd><![CDATA[}}}]]></blockEnd>
Then, add the following under the CodeColor_PHPScriptComment
<commentStart><![CDATA[--]]></commentStart>
<commentEnd><![CDATA[--]]></commentEnd>
Now, you should have the code coloring and the code hinting working.
However, I am still unable to get the Blade syntax coloring works in Dreamweaver. Here are the syntax that are still not working:
@section
@show
@yield
@extends
@parent
@stop
@if
@elseif
@else
@endif
@unless
@endunless
@for
@endfor
@foreach
@endforeach
@while
@endwhile
@include
@overwrite
@lang
@choice
If you know how to get the above syntax coloring works in Dreamweaver, please share with me. Thanks.
Maybe use @ as blockStart and ) as blockEnd. Problem is to keep track of opening and closing parenthesis.
This is the basic concept here, at github.com/Medalink/laravel-blade (laravel-blade.tmLanguage):
<key>foldingStartMarker</key>
<string>\@\b(section)\b(?=(|\s*|)\()</string>
<key>foldingStopMarker</key>
<string>\)(?!.*\))</string>