How to manually specify syntax highlighting for a specific extension in Eclipse?

耗尽温柔 提交于 2019-12-04 17:15:23

问题


I am editing some files with the extension '.ctp'. Although these files are perfectly valid PHP files, Eclipse doesn't seem to know that and refuses to do any syntax highlighting with them.

How can I manually instruct it to use PHP syntax coloring for '.ctp' files? Is there even a way to do that?


回答1:


In Preferences, go to General -> Content Types. Unfold Text, then go to PHP Content Type. Click Add and input *.ctp. Then apply your changes.

You may need to restart eclipse to take effect.



来源:https://stackoverflow.com/questions/4131128/how-to-manually-specify-syntax-highlighting-for-a-specific-extension-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!