Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Psylancer

macrumors newbie
Original poster
Dec 28, 2006
6
0
In Xcode 3, in c (or c++) with code sense auto complete turned on, if you typed "for" or "if" or "printf" or some other common C/C++ section of code an autocomplete would pop up and allow you to hit tab to fill out the remainder of the statement. In Xcode 4 I can see many of these blocks in the "Code Snippet" in the new right hand side toolbar, and I can set a keybinding for these. But is there any way to get back the context aware autocomplete? I picked through the documentation, but everything is just touting how awesome the new autocomplete is when its turned on.

Is what I am referring to called something besides autocomplete?
 
Last edited:
If I type for, forin, if or ifelse, it does bring up the code snippet in the code completion popup.

If I click and pause on a code snippet in the library, a popup appears. If I click on the Edit button, I can see what the completion shortcut is. For example, the "GCD: Dispatch Once" code snippet has the completion shortcut of dispatch_once.

Not all the code snippets have completion shortcuts assigned to them by default, for example, the Reusable UITableView Cell snippet.

I don't about these being context aware though.
 
Interesting, some code snippet shortcuts work while others don't. For example "typedef" works but "for" and "dowhile" don't show completions.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.