Game Development Community

Xcode 4 Syntax Highlighting trouble

by Alkor · in iTorque 2D · 12/10/2011 (5:57 am) · 3 replies

Is there a way to force the editor into C++ syntax highlighting mode on every .cs file?

#1
12/13/2011 (2:45 am)
Alkor,

Unfortunately it seems the editor uses the file extension to decide on the highlighting.

However what you can do is to select Editor > Syntax Coloring when you have a file open and select what you want from the list. It will keep that setting during a development session but lose it when you close the project.

If you want to make this a permanent change you can edit the Standard file types.pbfilespec file located at
"/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/A/Resources/Standard file types.pbfilespec"

It is pretty self explanatory.

Hope that helps,
D
#2
12/13/2011 (3:33 am)
you don't want it to highlight it.
if it would correctly highlight CS then you would get an all red file cause cs = C# and TS could be barely less correct in that context
#3
12/14/2011 (1:24 pm)
@Marc - unfortunately C++ is the closest you can get in 4.X because of its "blockade" of user defined definitions. It definitely is not perfect, however it gives some basic highlighting. I wouldn't be surprised if PHP or Java might be better.

D