SubEthaEdit and Xcode

Posted by dom Mon, 20 Mar 2006 10:00:00 GMT

Having talked about how we prefer using SubEthaEdit over the internal editor of Xcode let's talk about how you enable SubEthaEdit as external editor in Xcode. To do this go in Xcode's Preferences to the File Types Pane. Minimally you need to open the text type and change the sourcecode subtype by using the dropdown.

If you want to use SubEthaEdit for all plain text files like I do, I recommend also changing text.xml, text.html, text.plist and text.script. The final window with these setting applied looks like this:

Xcode preference Settings.

So what do you get by this change? Files double clicked in an Xcode project now are openend in SubEthaEdit and of double clicks on error jump to the error line in SubEthaEdit. Moreover if you press compile and there are changed files in SubEthaEdit you are asked if you want to save them first. All things expected.

Sadly, Xcode hasn't (yet) an api for setting breakpoints, that means if you want to set or remove breakpoints you still have to use the Xcode internal editor. We just switched to open all our text files in SubEthaEdit - so double clicking won't do. Thankfully there is an easy way: right- or ctrl-click on the file you want to open in the project view and choose Open As…Source Code File.

Opening files in the internal Xcode editor.

Posted in  | Tags ,  | 9 comments

Comments

  1. Mattias said 2 months later:
    Will Xcode 2.3 and SEE 2.5 let me use breakpoints with my favorite editor perhaps?
  2. map said 2 months later:
    Unfortunately we aren't there yet, but we are currently investigating using Xcode's AppleScript interface to achieve this.
  3. dom said 2 months later:
    actually here is what i tried for setting breakpoints: tell application "SubEthaEdit"
      set myName to name of front document
      set currentLine to startLineNumber of selection
    end tell

    tell application "Xcode"
      tell front project
        set theFile to file reference named myName
        set bp to make new file breakpoint with properties {line number:currentLine}
        set file reference of bp to file reference named myName
        set enabled of bp to true
      end tell
    end tell It works, but the breakpoint looks somewhat fishy as they don't show the symbol of the line in the name thats why we didn't include it in this release. But we will try to come up with a reasonable solution.
  4. Mattias said 2 months later:
    Ah, sounds nice. Make sure you tell us all in the changelog of the next version capable of this "must-have" feature, 'cause SEE is so much nicer than XCode's default editor...
  5. Brandon said over 4 years later:

    I wish Xcode supports API and we can also use breakpoints using Subethaedit as external editor.

  6. Patric White said over 4 years later:

    Does this work with other system or only Mac is required? PatricWhite

  7. Andy Young said over 4 years later:

    Do this version of X code is supported by iphone?

    AndyYoung

  8. Joe Wolmer said over 4 years later:

    nice information but can you tell me how i can translate apple script to x code?

  9. Boat salvage yards said over 4 years later:

    his accounts for the advance of the conclusion, which is an advantage in spontaneously scheduled meetings.

(leave url/email »)

   Comment Markup Help Preview comment