Make Xcode stop prompting to save files in other editors

Tired of having Xcode (3.x and later) prompt to you “Save Changes To ‘index.html’ before building?” when index.html is open in TextWrangler/BBedit and so on and has _nothing_ to do with the current iphone project you are working on? Read on for the answer!

The easy way is to just set the “For Unsaved Files” setting in the Building section of the Xcode preferences to not prompt you, but this defeats the prompt for files IN Xcode that you maybe DO want to be prompted to save.

In Xcode there was support for “external editors”. In Xcode 3.x I don’t see the UI for configuring these any longer so I’m not sure if it still exists or not. In any case, this functionality is the cause of the annoying prompts to save totally unrelated files other editors.

The list of external editors is in the file in your ~/Library/Preferences/ folder and removing that list “solves” the problem. There may be better ways to solve it, but this is the one I found that works.

The two keys are XCExternalEditorList, and PBXExternalEditorList, however in my test only the second one had to be removed to make these annoying prompts go away; in the terminal:

$ defaults delete PBXExternalEditorList

Of course Xcode shouldn’t be running when you do that or it’ll either ignore you or just rewrite them into the file.

*** Note that you probably DO want Interface Builder in the list of external editors in XCExternalEditorList (the newer key), so if you want to remove entries from that one, do them individually instead of removing the entire block of entries ***



One thought on “Make Xcode stop prompting to save files in other editors”

  1. Note that one person sent feedback that they had to remove entries for TextWrangler from the XCExternalEditorList also. I didn’t see that with BBEdit so not sure what the differences might be.

Leave a Reply

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

You are commenting using your 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

%d bloggers like this: