No Syntax Highlighting or Coding Help [message #725763] |
Thu, 15 September 2011 13:45  |
Eclipse User |
|
|
|
Using Eclipe Inidgo with CDT for a small C++ project. I have many years of C++ experience, but new to Eclipse, having only done a few dainty Java and RCP tutorials. Seems slick so far, and I like the cross-platform nature of it. Now I just need to get past some beginner problems...
In my first (and so far only) C++ project, with only one source file, there's no syntax highlighting. All black text on plain white background. When I type { following an 'if' statement, I expected the } to appear automatically just like in Java, but nothing happened. All the helpful coding actions in Java are absent. Eclipse is just a flat boring plain text editor!
The source file's properties shows that Eclipse knows it's a C++ source. I looked in many places for a checkbox to turn on syntax highlighting and other features, but no luck.
Then I created a new source file. It showed up with syntax highlighting. Automatic parenthesis and all that. Hooray!
Short term solution: I deleted my original source after pasting its contents into a new file. All is well.
The question remains: why did that first source file not have syntax highlighting? Bug, or did I unwittingly do something odd with it?
|
|
|
|
Re: No Syntax Highlighting or Coding Help [message #726150 is a reply to message #725903] |
Fri, 16 September 2011 12:48  |
Eclipse User |
|
|
|
Also make sure you are opening it with the C++ editor. Depending on how you created/opened the file initially, you may have had the file opened in the text editor. This editor doesn't provide syntax highlighting, code completion, etc. You can select the editor to open a file by right clicking on the file and selecting Open with. The current editor associated with the file will be marked with a dot. Eclipse remembers the last editor used on a file, so once you change it, it should remember it the next time.
|
|
|
Powered by
FUDForum. Page generated in 0.03622 seconds