21

Intellij Idea like this:(when I click enter the auto completion code will appear on the line)Intellij Idea like this:

RubyMine like this: The idea does not auto choose the first one.So I need to click down button and choose the select one.RubyMine like this

So I want to know is there anyway to let RubyMine choose first completion choice like Intellij Idea?

Community
  • 1
  • 1
Marshal Chen
  • 1,985
  • 4
  • 24
  • 35

2 Answers2

47

Autocompletion's behaviour in RubyMine has been changed since there were a lot of complains against it in previous versions (because it was choosing not always the desirable one option).

If you want to restore the old behaviour, type "Registry" in Search everywhere and look for ide.completion.lookup.element.preselect.depends.on.context and unselect it.

Note: To Search Everywhere double press "Shift" key. Don't mistake this for searching inside preferences window.

vaibhavatul47
  • 2,766
  • 4
  • 29
  • 42
Olivia
  • 1,521
  • 11
  • 7
  • 2
    Thank you! But when I searched "Registry" in RubyMine(version 7.1) there is only a Keymap.I searched "Registry" in Mac and did not find a file called "ide.completion.lookup.element.preselect.depends.on.context ".Could you tell me more steps of how to find it? – Marshal Chen Jun 03 '15 at 01:20
  • 3
    I suppose you were searching in Preferences , try doing it from the Search everywhere field: https://www.jetbrains.com/ruby/help/searching-everywhere.html – Olivia Jun 04 '15 at 10:59
  • Thank you! It's awesome! – Marshal Chen Jun 06 '15 at 12:25
  • So nice! Android Studio does this perfectly and I was always so frustrated with RubyMine not doing so. Thanks @Olivia! – mtrewartha Nov 12 '15 at 18:08
  • 2
    "Search everywhere" does not return any results in ruby mine 8.0.3, is there another way to change this? Some rubymine application file? – LordZardeck Apr 06 '16 at 16:49
  • Note, that this will automatically choose the element when typing `space`, `dot` - or pretty much any non-symbol keypress. That renders it unusable and that is why it's disabled by default. – raveren May 09 '16 at 14:48
  • 4
    @LordZardeck Try Shift+Cmd+A to open the Actions menu, and you can open the Registry from there. – Atif May 09 '16 at 16:10
0

There is now an option for this in the settings.

Go to Settings > Editor > Code Completion in the Ruby section and uncheck the checkbox Preselect first completion element :

enter image description here

Guillaume Bihet
  • 625
  • 1
  • 9
  • 17