Skip to content

Adding extension type to Xcode 3 syntax coloring

August 3, 2011

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!

Advertisement

From → Computers, Math

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.