Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Opening Files With an External Editor

Xcode does not limit you to using its built-in editors to view and edit your files. You can specify an external editor of your choosing as the preferred editor for opening files of a given type. To choose an external editor for all files of a particular type:

  1. Choose Xcode > Preferences, and click File Types.

  2. Find the appropriate file type and click in the Preferred Editor column; a pop-up menu appears.

  3. Select an option from the External Editor submenu. Currently, you can choose from the following options:

    • BBedit.

    • Text Wrangler.

    • SubEthaEdit.

    • emacs.

    • xemacs.

    • vi. Note that support for vi in Xcode is limited to opening the file in the editor.

    • Other. Choose this option to specify an external editor other than the ones specified earlier. When you select this option, a dialog that allows you to navigate to the application you wish to use as your external editor appears.

    Note that many of these external editors do not appear in the External Editor menu unless they are installed on your computer.

For example, to edit all your source files with BBEdit, open the File Types preference pane and expand these entries: file, then text. Select the source code entry, and choose External Editor > BBEdit from the pop-up menu that appears when you click in the Preferred Editor column.

There are some restrictions when you’re using an external editor:

To use emacs as an external editor, you must add these lines to your ~/.emacs file:

(autoload 'gnuserv-start "gnuserv-compat"
          "Allow this Emacs process to be a server for client  processes." t)
(gnuserv-start)


< Previous PageNext Page > Hide TOC


Last updated: 2006-11-07




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice