Is there anyway to let RubyMine choose first completion choice like Intellij Idea?
Asked Answered
M

2

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?

Merritt answered 1/6, 2015 at 14:50 Comment(2)
Use the tab key and it will select the first one.Roseline
@Roseline Thank you very much .Tab key can really help to select the first one.Merritt
S
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.

Salazar answered 2/6, 2015 at 9:12 Comment(6)
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?Merritt
I suppose you were searching in Preferences , try doing it from the Search everywhere field: jetbrains.com/ruby/help/searching-everywhere.htmlSalazar
So nice! Android Studio does this perfectly and I was always so frustrated with RubyMine not doing so. Thanks @Olivia!Untenable
"Search everywhere" does not return any results in ruby mine 8.0.3, is there another way to change this? Some rubymine application file?Elle
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.Consignee
@Elle Try Shift+Cmd+A to open the Actions menu, and you can open the Registry from there.Dumpish
S
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

Shirtmaker answered 2/6, 2022 at 13:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.