Rubymine Code Autocompletion

RubyMine code autocompletion

Although, RubyMine doesn't work for ALL code completion all the time due to the dynamic nature of Ruby. But, I still find it the BEST Ruby IDE for code completion, method navigation, searching features.

Here is a screenshot to show you how to configure RubyMine for Code Completion:

Sample Image

Here is a good tutorial by Justin Gordon which shows some awesome features of RubyMine which may interest you.

I don't know any other Ruby IDE that has smarter code completion than RubyMine. In fact, a vast majority of Ruby programmers doesn't even use an IDE, rather they use a Text Editor!

Here are couple of short sitepoint articles that would give you more insights:

Which IDEs do Rubyists Use?

What Editor Do Rubyists Use?

Does Rubymine have the feature code snippet and all auto-complete

Once you type begin then press TAB

It's called "Live Templates".

"Live templates (or code snippets) allow you to insert frequently-used constructions into your code. These can be conditions, blocks, loops, and so on."

You can manage bundled and create new ones at Settings/Preferences | Editor | Live Templates.

Here is a good "how to use" tutorial with screenshots: https://confluence.jetbrains.com/display/PhpStorm/Live+Templates+%28Snippets%29+in+PhpStorm -- it's for PhpStorm but exactly the same functionality is available in RubyMine.


UPDATE: 2022-11-15

The above tutorial link now automatically redirects to the corresponding Help page for PhpStorm.

Here is the same official Help page but for RubyMine that shows how to use and create them: https://www.jetbrains.com/help/ruby/using-live-templates.html

Cucumber. How to enable code completion for RSpec assertions in RubyMine

At the moment RubyMine doesn't have support for it. Please add your vote and follow the corresponding request:

https://youtrack.jetbrains.com/issue/RUBY-26444

IntelliJ autocompletion replacing the subsequent word

This behavior depends on the key that you use to select the item from the completion list. If you press Enter, the selected item is inserted in the code before the following identifier. If you press Tab, the selected item replaces the identifier following the cursor.

If you prefer, you can change the behavior by reassigning keyboard shortcuts for "Choose Lookup Item" and "Choose Lookup Item Replace" under Settings | Keymap.



Related Topics



Leave a reply



Submit