RubyMine 代码自动补全 [英] RubyMine code autocompletion

查看:32
本文介绍了RubyMine 代码自动补全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我即将习惯在 Android Studio 中使用 Java.最棒的是,一切都被强烈地宣布了.因此,当我键入 MyClass.someme... 时,IDE 为我提供了高级代码自动完成功能.发展迅速而愉快.

但后来我想学习 RubyOnRails.我爱上了 JetBrains 产品,所以我在我的 Windows 机器上安装了 RubyMine.

尽管 Windows 环境存在许多问题,但我还是对不太好的代码完成感到困惑.即使 IDE 知道该方法(可以通过 Ctrl+B 组合找到),它也不会在弹出菜单中提供它(发现图片).

来自

有没有办法解决这个问题?有没有更好的具有真正智能代码完成功能的 IDE?

解决方案

尽管由于 Ruby 的动态特性,RubyMine 并不总是适用于所有代码完成.但是,我仍然认为它是代码完成、方法导航、搜索功能的最佳 Ruby IDE.

这是一个屏幕截图,向您展示如何配置 RubyMine 以完成代码:

这里是贾斯汀的一个很好的教程Gordon 展示了您可能感兴趣的 RubyMine 的一些很棒的功能.

我不知道任何其他 Ruby IDE 的代码完成功能比 RubyMine 更智能.事实上,绝大多数 Ruby 程序员甚至不使用 IDE,而是使用文本编辑器!

以下是一些简短的站点点文章,可以为您提供更多见解:

Rubyists 使用哪些 IDE?

Rubyists 使用什么编辑器?

I'm about to get used to work with Java in Android Studio. The great thing there is that everything is strongly declared. So when I type MyClass.someme..., the IDE offers me advanced code autocompletion features. The development is rapid and pleasantly.

But then I wanted to learn RubyOnRails. I'm in love with JetBrains products and so I've installed RubyMine on my Windows machine.

Despite of a bag of problems with Windows enviroment, I was confused with not-so-well working code completion. Even if the method is known by the IDE (it can be found by Ctrl+B combination), it does not offer it in popup menu (discover the picture).

Function from railstutorial.org:

# SomeControllerHelper.rb
# Redirects to stored location (or to the default)
def redirect_back_or (default)
  redirect_to(session[:forwarding_url] || default)
  session.delete(:forwarding_url)
end

Is there any way to fix this problem? Are there any better IDEs with really smart code completion?

解决方案

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:

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?

这篇关于RubyMine 代码自动补全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆