eclipse-启用C语法突出显示,但不要将其视为C文件 [英] eclipse - enable C syntax highlighting but do not treat it as a C-file

查看:70
本文介绍了eclipse-启用C语法突出显示,但不要将其视为C文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用 C / C ++语法突出显示 在Eclipse中查看经过预处理的输出文件。

I would like to view preprocessed output files in Eclipse with C/C++ syntax highlighting.

因此,我将Eclipse配置为将 .pp 文件视为 .c 文件: eclipse-如何处理文件扩展名作为C档案。

So, I configured Eclipse to treat my .pp files like .c files : eclipse - how to treat file extension as C-file.

但是我现在的问题是当我对符号执行 Open Declaration 时,Eclipse包含了<$ c我在搜索中发现的$ c> .pp 文件是我不想要的C / C ++文件。

But my problem now is when I do Open Declaration on a symbol, Eclipse includes the .pp files in the search that I told it were C/C++ files which I do NOT want.

我怎么知道Eclipse将 C / C ++语法突出显示 应用于文件 .pp ,但不将其视为实际的C / C ++文件?

How do I tell Eclipse to apply C/C++ syntax highlighting to files .pp but to NOT treat them as actual C/C++ files?

推荐答案

您需要保持文件类型关联,以便语义突出显示和其他C / C ++编辑器功能正常工作。

You need to keep the file type association for semantic highlighting and other C/C++ editor features to work.

但是,通过在文件的属性|中选中从构建中排除资源,可以将文件排除在导航操作之外,例如打开声明。 C / C ++构建

这篇关于eclipse-启用C语法突出显示,但不要将其视为C文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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