CakePHP .ctp语法高亮在Eclipse中 [英] CakePHP .ctp syntax highlighting in Eclipse
问题描述
有关如何使语法突出显示工作的任何想法? >
确保您设置了正确的编辑器关联和内容类型
转到设置(窗口 - >首选项
)
内容类型
- 在搜索框中输入
内容类型
(应显示在下) - >类型
- 点击
Text
旁边的箭头,选择PHP内容类型
- 点击右侧的添加按钮添加
*。ctp
文件关联
- 在左边的搜索框中输入
文件关联
- 添加* .ctp(点击右上角的添加按钮侧)
- 关联正确的edi点击添加(右下方)并选择PHP编辑器
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
- 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
File Association
- 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
这篇关于CakePHP .ctp语法高亮在Eclipse中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!