在Eclipse中设置自定义语法高亮的快速方法 [英] Quick way to set custom syntax highlighting in Eclipse

查看:429
本文介绍了在Eclipse中设置自定义语法高亮的快速方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我不是第一个需要这个。我正在做一个内部创建的代码库,我想在Eclipse中应用突出显示。在记事本++我可以设置我正在看的文件的语言。有没有办法为Eclipse做这个?



我正在处理的代码将使用与C ++相同的语法样式。

解决方案

您最好的选择是转到首选项 - >常规 - >编辑器 - >文件关联。添加您尝试打开的东西的文件扩展名,并添加C ++编辑器作为关联的默认编辑器。



如果没有文件扩展名,那么事情有点更难。而不是双击打开文件,右键单击 - >打开与... - >其他 - > C ++编辑器。这将记住您选择该文件。


I know I'm not the first to need this. I am working on an in house created codebase and I would like to apply highlighting to it within Eclipse. In Notepad++ I can set language for the file I'm looking at. Is there any way to do this for Eclipse?

The code I'm working on would use the same syntax styling as C++.

解决方案

Your best bet is to go to Preferences -> General -> Editors -> File associations. Add the file extension of the thing you are trying to open and add the C++ editor as the associated default editor.

If there is no file extension, then things are a little harder. Instead of double-clicking to open the file, right-click -> Open with... -> other -> C++ editor. This will remember your choice for that file only.

这篇关于在Eclipse中设置自定义语法高亮的快速方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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