如何在Eclipse中手动指定特定扩展的语法高亮? [英] How to manually specify syntax highlighting for a specific extension in Eclipse?

查看:125
本文介绍了如何在Eclipse中手动指定特定扩展的语法高亮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用扩展名'.ctp'编辑一些文件。虽然这些文件是完全有效的PHP文件,但Eclipse似乎并不知道,并拒绝对其进行任何语法突出显示。

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.

我如何手动指示使用PHP的语法着色为'.ctp'文件?有没有办法这样做?

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

推荐答案

首选项中,转到 - > 内容类型。展开文本,然后转到 PHP内容类型。点击添加并输入* .ctp 。然后应用您的更改。

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

您可能需要重新启动eclipse才能生效。

You may need to restart eclipse to take effect.

这篇关于如何在Eclipse中手动指定特定扩展的语法高亮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆