I would be very very very very happy if there was a way to have a TextMate textview totally replace the Xcode editor. I'm sure others have asked for this, but searching through the list was painful on my slow-ass internet connection, so I make the request here.
The idea is that you could write a SIMBL wrapper or an Xcode plugin wrapper (the API, though private, has been documented) around a subclass of the Xcode TextView (a dump of the framework - used to be called PBX.framework or some such would garner the class) and then basically do a poseAs.
I, for one, would certainly be willing to pay for this feature. That is, I already own TM, and I would happily buy another license for this product for $40. What are the odds, difficulties, etc of this?
vinayvenkatesh
On 27/4/2006, at 20:53, Vinay Venkatesh wrote:
[...] I, for one, would certainly be willing to pay for this feature. That is, I already own TM, and I would happily buy another license for this product for $40. What are the odds, difficulties, etc of this?
I haven’t studied Xcode (internals), but it would likely be a hell of a lot of work, and require a lot of hacking.
Personally I have scraped Xcode and work exclusively in TextMate, it has both build and run actions (for Xcode projects). Sadly though, I need Xcode to tweak project settings, adding files and such. For this reason, I am considering switching to makefiles, as it would also allow more automation, i.e. base the project on the on-disk structure, rather than have to mimic that in the Xcode project.
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.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.
Unfortuantely for me, I don't have a real option to switch to makefiles as I am working on projects with others. ..
Allan Odgaard wrote:
On 27/4/2006, at 20:53, Vinay Venkatesh wrote:
[...] I, for one, would certainly be willing to pay for this feature. That is, I already own TM, and I would happily buy another license for this product for $40. What are the odds, difficulties, etc of this?
I haven’t studied Xcode (internals), but it would likely be a hell of a lot of work, and require a lot of hacking.
Personally I have scraped Xcode and work exclusively in TextMate, it has both build and run actions (for Xcode projects). Sadly though, I need Xcode to tweak project settings, adding files and such. For this reason, I am considering switching to makefiles, as it would also allow more automation, i.e. base the project on the on-disk structure, rather than have to mimic that in the Xcode project.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 28/4/2006, at 7:45, Vinay Venkatesh wrote:
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.
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.
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.
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.
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