【发布时间】:2018-03-31 11:09:30
【问题描述】:
是否有任何 sublime 插件为 PHP 的 Symfony 注释添加颜色突出显示?还是很容易以其他方式添加?即使注解是写成 PHP cmets 的,那里也有一些颜色会很好。
【问题讨论】:
标签: symfony annotations sublimetext3
是否有任何 sublime 插件为 PHP 的 Symfony 注释添加颜色突出显示?还是很容易以其他方式添加?即使注解是写成 PHP cmets 的,那里也有一些颜色会很好。
【问题讨论】:
标签: symfony annotations sublimetext3
目前没有插件,但我找到了一个 interesting Gist,其中包含更改默认 PHP 语法突出显示以支持 Symfony、Doctrine 和 JMS 注释的说明。
这些是您应该为 PHP 文档添加的 dict 模式:
<dict>
<key>match</key>
<string>\@(Route|Template|Method|ParamConverter|Cache)\b</string>
<key>name</key>
<string>keyword.other.symfonyannotations.php</string>
</dict>
<dict>
<key>match</key>
<string>\@(Assert)\b</string>
<key>name</key>
<string>keyword.other.symfonyassertannotations.php</string>
</dict>
<dict>
<key>match</key>
<string>\@(ORM)\b</string>
<key>name</key>
<string>keyword.other.doctrineannotations.php</string>
</dict>
<dict>
<key>match</key>
<string>\@(Secure)\b</string>
<key>name</key>
<string>keyword.other.jmssecurityannotations.php</string>
</dict>
有关详细说明,请参阅 Gist ??
(注意:我个人还没有尝试过,但对我来说看起来不错)
【讨论】: