Stop Xcode from Hijacking my File Associations I typically associate certain file types with certain editors and IDEs. You know R with RStudio, Java with JetBrains, and all the other goodies with Sublime Text.

But every time I install an Xcode update, Xcode takes over every code-related extension imaginable, and I have to associate my files manually.

Is there anyway to prevent Xcode from taking over my file associations?
Absolutely there is!
Unfortunately because Xcode is installed through the Mac App Store, we are unable to control / prevent the change from occurring in the first place. The automated installation takes care of that for us.

How to Change the Default Programs
Luckily there is an easy fix to resolving the issue and reversing the change. The only caveat of which is the fact that this is done on an extension-based level.


Go to any file whose extension you don't want to open with Xcode (e.g. my file.java).
Right click on it, select Get Info (or CMD I).
Under Open With, select your editor for that extension.
Click Change All to make the change global across all files of this type.


I believe some IDEs or even individual Text editors will ask if you would like to associate them with the most common formats for software development - with Xcode that's a little less optional. Anyway, hope that helps, let me know if it did and how you make out. I'd be interested in following up with you on this.