Important: The information in this document is obsolete and should not be used for new development.
You can permanently change how Xcode edits a particular type of file. In particular, you can specify how files of a certain type are treated and you can choose which editor is used to handle those files. For example, you can choose to view all HTML files as plain text, so you can edit them. Or you can choose to edit all your source files in BBEdit.
To see the file types that Xcode recognizes, choose Xcode > Preferences and click File Types. The File Types pane lists all of the folder and file types that Xcode handles and the preferred editor for each of those types. These file and folder types are organized into groups, from the most general to the most specific. Click the disclosure triangle next to an entry in the File Type column to reveal its contents.
To change the editor used for a particular file type, find the entry for the file type, click in the Preferred Editor column, and choose an option from the menu that appears. For example, to change Xcode to view all HTML files—including documentation files—as plain text, expand the following entries: file, then text, and then text.html. As mentioned earlier, Xcode already treats most HTML files as plain text by default; the value in the Preferred Editor column for the text.html entry is “Plain Text File,” indicating the preferred editor for plain text files. However, the value in the Preferred Editor column for the text.html.documentation entry is “HTML File,” which overrides the text.html setting. To make Xcode treat HTML documentation files as plain text, select text.html.documentation, click in the Preferred Editor column and choose “Plain Text File” from the pop-up menu, as shown here.
With this change, Xcode uses the preferred editor for plain text files to open all HTML files. In the example shown in the previous figure, the preferred editor for plain text files is Xcode’s default text editor.
You can also specify an external editor to use or have Xcode use the user’s preferred application, as specified by the Finder, when opening files of a given type, as described in the following sections.
Last updated: 2006-11-07