I would like to batch-remove all associations between XCode and any file type, because it is the default app for so many which I always have to manually set to MacVim.

So I'd like to do this once and for all. Is there some place where these Associations are stored in an editable format?

To be clear, I am looking for something more powerful than Cmd-I > Open With > Change All which would have to be done manually for each file type for which XCode installs itself as the default app.

I run 10.12.1.

2 Answers 2


Right click on a file with that file extension, click Get Info (or just select the file and Cmd+I). Now in the Open with section change to an app you want to open that file with, now there should be a button under the place where you set the app to open with that sets all file with this extension to open with that app. After clicking the button, you might need an admin password. Here is a screenshot of the app chooser and the change all button:


  • Well this is clear, I'm specifically asking how to do this for several file types at once, I don't want to do it for .cpp, .cxx, .m,... individually. I'll edit the question.
    – oarfish
    Commented Dec 7, 2016 at 9:00
  • @oarfish I don't think this is possible in stock macOS. If you don't want to go through this process, the next time when you open a file with that extension, right click on the file, hold option so the Open with menu turns into Always open with, then select the app.
    – Tom Shen
    Commented Dec 7, 2016 at 9:11

if you have done with Xcode, uninstall it.

  • What if the OP intends to keep Xcode but just wants to avoid having it opening on a any dev-related file type?
    – nohillside
    Commented Dec 7, 2016 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .