Completion Dictionary for Xcode

Completion Dictionary from Objective Development (found via Daring Fireball) provides Xcode with behavior somewhat similar to TextMate's snippets. It's very nicely done, but I'd need to spend more time with it before I could really weigh it relative to TextMate.

Realistically, I probably won't get around to doing this. It does address one major difference between Xcode and TextMate, but it doesn't appear to offer anything TextMate does not. It is, however, free. (Since this is 4.0, I'm guessing it's been around for a while, but I don't know what the previous versions were like).

Completion Dictionary Macro List

Of course, TextMate is not limited to snippets. There are bundle items that reformat existing code or filter it through various tools to get different results. The bundle items can also be bound to key equivalents as opposed to just tab triggers.

TextMate's engine can also perform continual re-evaluation of snippets, so that if you're editing a method snippet and change the return type to "void," the return statement will be automatically removed. Completion Dictionary gets part of the way there by using a interactive dialog, but I think I prefer editing things inline.

Completion Dictionary Dialog

There's no question Completion Dictionary is well executed, but it only addresses one specific area of difference between TextMate and Xcode. Each has their own advatanges, and which one works best for you depends on your needs and habits.

TextMate recently gained Cocoa method completions, but Xcode still is able to detect the best methods based on the type of object the message is being sent to. On the other hand, TextMate has much more comprehensive text manipulation tools in general, and some really fancy tricks like the C bundles's "Insert Missing Includes" command.

Bottom line, you should install Completion Dictionary either way, because even heavy TextMate users are in Xcode at least some of the time.
Design Element
Completion Dictionary for Xcode
Posted Nov 14, 2006 — 4 comments below


Sebastian Krau — Nov 14, 06 2405

Xcode already has a built-in feature somewhat similar to that: text macros. (They're in the "Edit" menu.)
Unfortunately, the documentation on these was either written in a way that I don't understand it or it's just plain bad. I never got it how to really cutsomize them and how I can define my own "completion prefixes".

Scott Stevenson — Nov 14, 06 2409 Scotty the Leopard

TextMate's tab triggers are just unbelievably convenient because you hit tab to activate one, and tab to move through all the markers. There might be some way to get the same thing to work in Xcode, but I haven't dug deeply enough yet.

By default, Xcode's triggers are Control-Esc for completion (standard for Cocoa text) and Control-/ to move through the makers.

Florent Pillet — Nov 21, 06 2462

Thank you thank you thank you! I had been using ODCompletion for years until the switch to Intel and it was sorely missed. Apple's completion is fine to find method names, but it's nowhere close to ODCompletion when you are typing code in a file where most of the names you use are already in use somewhere else in the file.

I like their macros so much that you'll find an ODCompletion bundle I made for TextMate (it's in the TM bundles SVN, I'm not sure Allan ever added it to the shipping version);

Bill Hernandez — Feb 11, 10 7406

Thank You for the magnificent tutorials...

I found your tutorials page today, what a pleasant surprise...


Comments Temporarily Disabled

I had to temporarily disable comments due to spam. I'll re-enable them soon.

Copyright © Scott Stevenson 2004-2015