Eclipse: syntax highlighting disappeared for one o

2019-02-04 05:02发布

问题:

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:

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.

回答1:

I guess you accidentally opened the file with the 'Text Editor'. Refer screenshot below.



回答2:

In C/C++ is also a scalability mode which disable syntax highlighting if the file has more than 5000 lines.