在Eclipse中的CakePHP .ctp语法突出显示 [英] CakePHP .ctp syntax highlighting in Eclipse
问题描述
为什么CakePHP决定创建自己的文件格式而不是.tpl是超越我...尽管如此,我不能得到语法高亮在Eclipse中工作...我遵循本指南:
http:// planetcakephp。 org / aggregator / items / 5452-opening-ctp-file-with-syntax-highlight-in-eclipse (死链接),但它不工作,我请参阅有关此文件的不受支持的内容类型的错误。我已经为这个文件类型的PHP编辑器添加了一个关联,它仍然显示问题。
有关如何获得语法高亮的工作的任何想法? >
确保您已设置正确的编辑器关联和内容类型
设置(窗口 - >首选项
)
内容类型
- 在搜索框中键入
内容类型
(应显示在- >类型
- 单击
文本
旁边的箭头,选择PHP内容类型
- 通过单击右侧的添加按钮添加
*。ctp
li>
档案关联
- 在左侧的搜索框中输入
文件关联
- 添加* .ctp(单击右上角的添加按钮
- 通过点击添加(右下角)并选择PHP编辑器来关联适当的编辑器
- Type in
Content Types
in the search box (should show underGeneral -> Types
- Click on the arrow next to
Text
, selectPHP Content Type
- Add
*.ctp
by clicking on the Add button on the right side - Type in
File Associations
in the search box on the left - Add *.ctp (click the Add button on the top right side)
- Associate the proper editor for it by clicking Add (on the bottom right side) and selecting PHP Editor
Why CakePHP decided to build their own file format instead of .tpl is beyond me... despite that, i can't get syntax highlighting to work in Eclipse... I've followed this guide:
http://planetcakephp.org/aggregator/items/5452-opening-ctp-file-with-syntax-highlight-in-eclipse (dead link) but it doesn't work, I see an error about an unsupported content type for this file. I've added an association to the PHP editor for this file type and it still shows the issue.
Any ideas on how to get syntax highlighting to work?
Make sure you have set the correct editor associations and content types
Go to settings (Window -> preferences
)
Content Types
File Association
这篇关于在Eclipse中的CakePHP .ctp语法突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!