Laravel Blade的Adobe Dreamweaver代码着色

问题描述 投票:2回答:1

我想很多使用Dreamweaver作为Laravel Blade文本编辑器的人都会面临代码/语法着色不受支持的问题。没有代码着色,编码很难阅读。因此,我决定在Dreamweaver上进行一些“黑客攻击”,以便使用Laravel Blade进行代码着色。

为此,您需要转到C:\ Program Files(x86)\ Adob​​e \ Adob​​e Dreamweaver CS6 \ configuration \ CodeColoring文件夹。然后,编辑php.xml文件。

在CodeColor_PHPScriptBlock下添加以下内容

<blockStart doctypes="PHP_MySQL" scheme="customText"><![CDATA[{{]]></blockStart>
<blockEnd><![CDATA[}}]]></blockEnd>
<blockStart doctypes="PHP_MySQL" scheme="customText"><![CDATA[{{{]]></blockStart>
<blockEnd><![CDATA[}}}]]></blockEnd>

然后,在CodeColor_PHPScriptComment下添加以下内容

<commentStart><![CDATA[--]]></commentStart>
<commentEnd><![CDATA[--]]></commentEnd>

现在,你应该有代码着色和代码提示工作。

但是,我仍然无法在Dreamweaver中使用Blade语法着色。以下是仍然不起作用的语法:

@section
@show
@yield
@extends
@parent
@stop
@if
@elseif
@else
@endif
@unless
@endunless
@for
@endfor
@foreach
@endforeach
@while
@endwhile
@include
@overwrite
@lang
@choice

如果您知道如何在Dreamweaver中使用上述语法着色,请与我分享。谢谢。

php adobe laravel dreamweaver blade
1个回答
0
投票

也许使用@作为blockStart和)作为blockEnd。问题是跟踪开括号和右括号。

这是基本概念,请访问github.com/Medalink/laravel-blade(laravel-flade.tmLanguage):

<key>foldingStartMarker</key>
<string>\@\b(section)\b(?=(|\s*|)\()</string>
<key>foldingStopMarker</key>
<string>\)(?!.*\))</string>
© www.soinside.com 2019 - 2024. All rights reserved.