Xcode completion menu not completing on enter, I have to use mouse/touchpad cursor and click there, so its quite annoying. How can I just autocomplete by keyboard ? Is this some miss-configuration of keybindings ? I never used Xcode editor so I am not sure if this is not standard behavior... Coming from App-code so I am used to do everything by keyboard but most of keybindings I had to re-configure...

  • No special configuration is required for autocompletion to work using keyboard. Kindly edit the question and specify the exactly how you are expecting the autocomplete to work, what keys are you using etc. – Nimesh Neema Nov 28 '18 at 7:50
  • Do you mean that the autocompletion context menu doesn't open without hovering/clicking with the mouse cursor or actually selecting an entry from it won't work by pressing enter? – Gero Nov 28 '18 at 9:14
  • @Gero selecting by pressing enter is not working, I have to click there and select by cursor, I want to choose the completion by up/down keys and press enter but enter just will make new line in editor... – Renetik Nov 28 '18 at 17:23

This is weird and seems to be a bug in your installation somehow, i.e. it's certainly not how Xcode is supposed to work.

The standard shortcut to open the code completion menu (which seems to work for you, I'm just being thorough here) is Alt+Esc. For some reason simply pressing Esc also works (at least for me, has always been that way and I always used the default settings in Xcode).

Stepping through the suggestions has, according to the settings, the shortcuts Ctrl+. (that's a full stop) and Ctrl+, but using the arrow keys also works for me (and always has), in spite of not being defined in the settings.

Selecting/confirming an entry doesn't even have a shortcut per se, because it's less an Xcode and more of a standard selection mechanism for any similar kind of list under macOS I guess. It doesn't even show up in the settings as far as I can see it. For me (and everybody else I have ever worked with) it's done as you expect as well: Pressing Return or Enter (both work).

This unfortunately only answers half of your question: As said, the behavior you see is not the standard (or to be expected at all).

I'd suggest to take a look at the "Key Bindings" section of the Preferences ("Xcode - Preferences..." menu), though I assume you already did that. It can list conflicts for you. Other than that you also might want to take a look at the general input settings (" - System Preferences... - Keyboard"). You can also define various keyboard shortcuts there, maybe that's causing some kind of conflict.

|improve this answer|||||
  • Looks like reinstall of xCode then is waiting for me... I checked again conflicts and disabled all system key shortcuts because I don't use them, but Enter just makes new line when I have open competition menu and selected item there :), good to know it's not standard behavior, I can hope for better in near future. – Renetik Nov 29 '18 at 16:29
  • After reinstallation of my whole system it started to work as intended :) – Renetik Dec 3 '18 at 15:36
  • Oh dear, I'm sorry you had to go through a complete reinstallation! :( Let's hope this was a one-time oddity. Have fun coding away now! – Gero Dec 3 '18 at 20:06
  • Well not really I had issue on my ssd where only option was to reformat so thats why I ended like this... anyway as a side effect, enter works for Xcode completion now ... – Renetik Dec 3 '18 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .