Eclipse:我的一个文件的语法突出显示消失了
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13237163/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse: syntax highlighting disappeared for one of my files
提问by Kirill Smirnov
I was trying to close unused files in Eclipse and accidentally made something wrong. Now I can't see syntax highlighting for one of my files.
Here are two screenshots - on the first you can see file, where highlighting is broken, and on the second everything is fine:
我试图关闭 Eclipse 中未使用的文件,但不小心出错了。现在我看不到我的文件之一的语法突出显示。这是两个屏幕截图 - 在第一个你可以看到文件,其中突出显示被破坏,在第二个一切都很好:
Highlighting doesn't work for this file only. Extension of this file is correct. I tried to look through all menu buttons carefully, but this attempt failed, I suppose Eclipse is hard enough for newbie. Of course, I tried to find information in the Web, but couldn't get anything relative.
突出显示仅适用于该文件。此文件的扩展名是正确的。我试图仔细查看所有菜单按钮,但这次尝试失败了,我想 Eclipse 对新手来说已经够难了。当然,我试图在网络上查找信息,但无法获得任何相关信息。
回答by Arun Manivannan
I guess you accidentally opened the file with the 'Text Editor'. Refer screenshot below.
我猜你不小心用“文本编辑器”打开了文件。请参阅下面的屏幕截图。
回答by JaMaBing
In C/C++is also a scalability mode which disable syntax highlighting if the file has more than 5000
lines.
在C/C++中也是一种可扩展模式,如果文件多于5000
行,则禁用语法突出显示。