[TxMt] A Feature I would kill (and pay for) true Xcode integration...

Rob Rix rix.rob at gmail.com
Fri Apr 28 12:03:48 UTC 2006


>> Yeah, thanks for the response Allan.  Well, I'll tell you what.   
>> If you're willing to do _some_ hacking, I'll hack around Xcode  
>> internals and see if I can work up a sample plugin that does  
>> something similar...
>
> I can’t imagine that this is anything but horrible and  
> frustratingly complex, and I am not setting time aside for such  
> venture ;) I would encourage you to submit feedback to Apple for  
> “modularizing” Xcode to better leverage external text editors.  
> Although personally, I do not have much faith in this going to ever  
> work very well.

For the record, I have no faith in it ever being particularly seamless.

> IMHO Apple should (if getting TM to “work” with Xcode is the goal)  
> provide shell commands to manipulate their (currently closed)  
> project formats and open up their project indexing and  
> documentation lookup stuff.

Yes, absolutely. Now, that said--

We still haven't explored all the possibilities for integration.  
Xcode lacks a tool for doing target management from the command-line,  
but it has a lot of functionality exposed via AppleScript. It  
requires you to keep Xcode open in the background (which is  
unfortunate), and possibly even to keep the project open in it (which  
is also unfortunate), but it could handle everything needed to add  
and remove files to and from Xcode targets, switch targets, etc. I'm  
not expecting it to tweak build settings just yet, but there's a lot  
that can be done.

And, now that we have this lovely little AppleScript bundle, I'm  
considering giving this a shot. I'll probably describe my efforts in  
a bit better detail once I have something working.

>> I.e.  I don't know what the TextMate TextView inheritence is, but  
>> I'd be willing to get you the information to at least investigate  
>> the possibility.
>
> There is none. TextMate’s control inherits directly from NSView/ 
> NSResponder and implements the NSTextInput protocol, but that’s it.  
> Fitting it into Xcode is not simple.

As an experiment, if someone (not Allan) were tenaciously interested  
in trying something like this, it might be interesting to make a very  
simple NSTextInput-implementing NSView class (_very_ simple), and  
instead of using poseAs:, make it a full-size subview of Xcode's text  
view. It's not necessarily going to be a good way to work, but it  
would be an idea.

I say "not Allan" because I want TM 2.0 and 2.1 and future versions,  
and I really don't care about being able to use TM's editor in  
Xcode-- and the reasons for that include that I prefer TM's project  
drawer to Xcode's project window/drawer, I like tabs, and, perhaps  
most importantly, I have all the TextMate-Xcode integration I need  
thanks to the Xcode bundle.

>> Unfortuantely for me, I don't have a real option to switch to  
>> makefiles as I am working on projects with others.  ..
>
> Okay, but did you try dragging the folder with the Xcode project  
> onto TextMate? You can still keep Xcode open in the background, but  
> do all editing in TM, including getting features such as cmd-T for  
> switching between files, you can double click Nib files in the  
> project drawer to open them in Interface Builder, you can use cmd- 
> B / cmd-R to build and run the project, and builds have clickable  
> errors that take you to the erroneous line, and you can use control  
> H on either Cocoa classes/symbols or POSIX/stdlib functions to get  
> documentation for that.

This is what I do. And in all honesty, makefiles would not offer me  
anything but headaches, so I'm staying with this; far and away the  
best thing (in my relatively small, uninformed opinion) about Xcode  
is its build system; I don't have to think about it, which makes me  
just that little bit happier (:

Rob


More information about the textmate mailing list