Switching from TextMate to XCode to work on the upcoming HipChat iPhone app has been a little painful. TextMate has some incredibly helpful features that I feel very unproductive without. Luckily some of them can be enabled or emulated. Here’s what we’ve found:
Go to File (Command-T)
TextMate's Go to File popup - so awesome!
The Go to File popup is probably TextMate’s most beloved feature. After using it for a while it seems amazing that its not part of every IDE out there. XCode’s “Open quickly” (Command-Shift-D) doesn’t cut it because it doesn’t do partial matching on the filename.
There are two options (both paid tools) for adding this functionality to XCode:
- PeepOpen — $12, beta software, great potential but not actively maintained
- Code Pilot — $30, more mature and full of other nice features
If you want to bind either tool to Command-T you’ll need to unbind XCode’s default key binding for the “Show Fonts” dialog first. To do that, open your XCode preferences and clear out option shown here.
The “Delete line” (Control-K) and “Duplicate line” (Control-Shift-D) shortcuts can be added system wide by placing the following in ~/Library/KeyBindings/PBKeyBinding.dict:
"^$K" = (
"^$D" = (
Full details and other options are available in this Stack Overflow post.
TextMate's Twilight theme in XCode
Using the same theme in all your IDEs can make it a lot easier to jump between them seamlessly. Here’s a tool you can use to convert your existing TextMate theme to work in XCode: XThemes.
There’s also a downloadable version of the Twilight theme for XCode here.
Unfortunately there’s no way to get a tab-based display in XCode, so you’ll have to get good at switching between files using your Command-T replacement or via one of the suggestions here.
We hope these tips can make you a little more productive in XCode. If you’re looking for more make sure you check out this Stack Overflow thread. Oh and keep an eye out for the HipChat iPhone app.