Adding extension type to Xcode 3 syntax coloring
It has been a long vacation from this blog, but I am brining it back with a fix that has been troubling me for sooooo long. I do a lot of my research in cython, which has source file extensions “.pyx”, instead of the usual python extension “.py”. I finally discovered how to do this, after much effort.
The hint came from: http://wotnau.blogspot.com/2009/03/xcode-erb-file-highlighting.html
Basically I just opened the file /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/Current/Resources/Standard file types.pbfilespec in an editor, and on the line that read:
- Extensions = (py);
I changed to:
- Extensions = (py,pyx);
Thats it! Now my .pyx files open in Xcode with the syntax coloring of a .py file. If this has been troubling you too, I think this will likely work!