Reputation: 35
I have bolded important information to make this easier to read.
I just updated to Xcode 7.3 yesterday and have tried all day to fix my issue. For class we are programming in C and use SVN to modify all of our files to create our project. I was using Xcode 7.2 to do all of the previous assignments.
My current routine is that I do not create new projects for our assignments, I just open the *.c files with Xcode. Where my problem comes up is that when I start typing for instance a "For loop" in the previous version I get this for autocomplete:
for (initialize; condition; reinitialize){
statements
}
where I could tab across and edit the place holders with variables/values that I would use in the loop. Now in Xcode 7.3 when I type for all autocomplete shows me is just this with no brackets or parenthesis.
If I drag the snippets to the middle of my code it appears, but that is time consuming and frankly a pain. I have tried deleting derived data, but seeing as I don't create a new project for each assignment I don't think this helps me. I have also tried deleting the cache file and reinstalling the old 7.2 Xcode to no avail.
Any help is appreciated.
Upvotes: 3
Views: 635
Reputation: 35
I found my solution to why it is not working. In the .c file I was currently working on, the functions where defined like this:
int main()
// comments
{
Return
}
And when I went to type for in it would not register it as a function, but if I changed where the bracket is to this:
int main(){
// comments
Return
}
I get code completion like I used to. I am not sure why this is an issue because I swear it was working before.
Upvotes: 0
Reputation: 618
Hit the Tab or Enter key when you see 'for' I think. It auto fills the rest of the stuff for me at least at which point you can Tab more.
EDIT: Don't hit Space key after typing 'for', then the autocomplete suggestions go away. Looks like this in 7.3 (slightly diff. param names than yours).
for (initialization; condition; increment) {
statements
}
Upvotes: 0