1

Xcode's desire to complete certain things drives me nuts. If I type "else" and hit return, for example, I want to just end up on the next line after my "else", but instead I accidentally select Xcode's "else" completion and I'm still on the same line, which is literally never what I want. I like code completion in general, it's these ones that effectively replace normal code typing that bother me. Is there a way to disable specific completions in Xcode 6? This question asked basically the same thing (the author was even also bugged by the "else" completion – seriously, Apple, please remove that one), but all of the answers to it are out of date and do not apply to Xcode 6. (I would have just commented on that question, but doing so requires 50 reputation, so I had to start a new question instead, grr.) Xcode 6 has the macro browser thing where you can add new completions, but it does not seem to be possible to disable their built-in completions there. Is there a config file somewhere that can be edited?

Community
  • 1
  • 1
bhaller
  • 1,803
  • 15
  • 24

1 Answers1

0

The problem that Xcode doesn't have completion snippet for "else" statement. It has only for "if" and "if - else" statements.

I propose to create custom snippet for your goal.
Here is an example how it should look like:
enter image description here

Vlad Papko
  • 13,184
  • 4
  • 41
  • 57
  • That doesn't get the behavior I want. I don't want completion to a snippet like this, with braces and stuff; I just want it to leave me alone. Any completion macro requires me to hit return to accept the completion, which eats the return key that I wanted to put me on a new line. – bhaller Jun 06 '15 at 00:54
  • @BenHaller, in this case just remove { } from my example and add empty line. – Vlad Papko Jun 08 '15 at 00:58
  • @BenHaller, it strange, for me it works. Try to remove braces, but leave on next line. It will bring you on next line. – Vlad Papko Jun 08 '15 at 14:58
  • Well, I'm mystified. I've got else on the first line, the magic thingy on the next line; when I type else and select the completion by hitting return, I remain on the same line, and the magic thingy does not appear. I quit and relaunched Xcode, no change. Sigh. Thanks for trying. I think I'm back at my original question: is there some way to disable particular Xcode completions? – bhaller Jun 08 '15 at 18:38
  • Note that the "double" completion Xcode ever-so-helpfully provides is also annoying, because it prevents you from typing "do" and then return and then an opening brace to start a do-loop; you end up with "double{". Sigh. – bhaller Jul 17 '15 at 20:21