Jun 27 2008
TextMate and Xcode
I’ve been spending time getting familiar with Xcode as I learn to write applications in Objective-C, with the larger goal of writing applications for iPhone. My editor of choice on the Mac up to this point, is TextMate, an great all around code editor. I’ve written a number of tutorials/tips on TextMate on this blog (check out the TextMate Category for links).
One of the things I’ve become quite accustomed to is tabbed based user interfaces. For example, in FireFox I typically have a screenful of open tabs. When working with projects inside of TextMate, you can have multiple source code files open in tabs. Unfortunately, this is not a feature supported in Xcode (that I am aware of).
So, I spent a few minutes poking around at various options and came up with an approach that is far from perfect, yet offers a blend of coding in TextMate and managing compiles/builds in Xcode. Not perfect, however, it’s working for me.
Click on the image below to learn more.
Tips by RSS
Tips by Email

Thank you very much for this excellent tip. XCode not having a tabbed interface is a real annoyance but this approach works fairly good and is much more productive than constantly switching between files.
Keep up the good work…
You can use “tabs” in XCode, it is just not as intuitive as you would expect from Apple. In the upper left corner there is a list of files that are open in the current window, you can use Option+Apple+Left and Right to flip between the files open in that window. As with all OS X applications you can switch between the current windows open in an application using Apple+`
It isn’t as nice as TextMate’s tab system (or even more addicting Apple+T “Go To File”) so if you are a keyboard shortcut addict, TextMate should still be your primary editor.
Why not using the xcode bundle in textmate ?
You can use the import project command and TextMate create a project for you.
You can then build and run with cmd+B and cmd+R.
I usually open a project in xcode and textmate, but I use xcode only for the project management aspect and debugging.
XCode seems quite cool, but sor far, nothing can beat TextMate bundle system.
David,
Thanks for the comment. I’ve tried the bundle and you are right, it’s works well.
One aspect that I really like about using Xcode is the integration of compiling, running and debugging.
My approach may not be for everyone, however, if nothing else it (once again) demonstrates how flexible TextMate is and that it can provide different things to different people.
John
While TextMate looks nice to use; however, I am a Vi editor at heart. Nothing beats the ability to move around and edit as fast in a Vi environment.
MacVim is the preferred Vi editor and truly love it as it does support tabs as well.
I can use MacVim to edit Xcode files but code-completion is what is lacking here. I wonder if it’s the same for TextMate? From the sounds of it, it supports code-completion?
Chad
Hi Chad,
it doesn’t have code completion in the sense of an IDE but there are a lot of tab-trigger snippets and a rudimentary code completion via ?+ESCAPE.
Greetings
In the video you are saying that you are going up one level in folder structure to drop the folder onto TextMate’s icon.
Here’s a little timesafer: You can click the top of a finder window (the little blue folder) and then drag that one onto TM’s icon. :)
I would like to know where I can found the autocomplete with Textmate. In fact, I would like to find the same as in Xcode. Can you help me please ?
Thank you !