- Quickly find files
- Keep recently used files at my fingertips
- Autocomplete long variable and method names
- Do common VCS commands like diff and revert
- Supply a tree view of the project directories
- Jump to method definitions
- Text search
- Run Tests
- Debug
- Performance
- Cost
- Learning Curve
Things to note
- I'm using the rails codebase to illustrate my examples.
- I'm omitting installation discussion and ask you to refer to github if you need details on how things are configured.
- My plugins have keymappings that are setup to be reminiscent of RM/IntelliJ
- vividchalk is simply the best color scheme with desert256 a close second
In vim I use the fuzzyfinder plugin for this. In RM there is "Go To File" (ctrl-shift-n). Both of these pretty much just work, each one has nuances that skew things in their own favor so I'm calling this one a draw. Here is a screenshot of me finding base.rb in active_record with fuzzyfinder.

Keep recently used files at my fingertips
In vim I use the MRU plugin for this. It shows you a list of most recently used files and lets you quickly jump to one. I map this plugin to ctrl-e. RM has the same functionality. Once again a tie.
Autocomplete long variable and method names
In Vim I use Supertab for this and it is an amazing tool that nearly always offers good completions. By contrast RM ctrl-space often times offers no suggestions. Here is an example. Opening up active_record/base.rb to the respond_to? method in each app, when I begin to type DynamicFinderMatch, "Dyn..." and ctrl-space in RubyMine I get no suggestions. With supertab I get 3 suggestions: Dynamic, DynamicFinderMatch and DynamicScopeMatch. Below are some screenshots of Vim and Rubymine tab completion in action. Viva Supertab!


Do common VCS commands like diff and revert
In Vim I use the vcscommand plugin for this. Mostly I do things like diff my working copy against the repository, revert files to pristine condition or look through the VCS logs. vcscommand does all these well, plus it supports more VCS systems including git, hg, and bzr, but Rubymine really shines because of it's excellent visual diff/merge tool. Winner RM. Here is a screenshot of vcscommand showing base.rb's commit history.

Supply a tree view of the project directories
In Vim I use the NERD tree plugin for this. I find nerd tree to be just as good as the project view in RubyMine, though it is more difficult to use because I can't be bothered to remember all the nifty commands and shortcuts for doing things to the filesystem via the NERD tree. Edge RM.

Take me to method definitions
In Vim I use exuberant ctags for this. This is a standard vim feature, not a plugin. Ctags builds an index of your code that vim can use to navigate files. It works ok for standard ruby, but with lots of metaprogramming (rails anyone?) it really sucks. RM command+click offers much better support for this. Caveat, I think rails.vim helps with this and lets you jump to related files (related controllers and views or models and migrations), but for jump to method and variable definitions RM is king.
Text search
You can do inline grepping in vim with grep.vim, but I usually just grep from the command line. Once again this is an area where RubyMine has the edge. RM's collapsable search results that you can click through are powerful.
Run Tests
You can invoke tests from either one (though I don't have it setup in vim because I just use autospec which constantly runs my tests in the background). Still RM has pretty green bars and I'm a sucker for that. Edge RM.
Debugging
Vim has a Ruby Debugger called vim-ruby-debugger. Doing TDD I rarely find myself in need of a debugger so I haven't played with it. From the description and screenshots it looks as good as the RubyMine offering, so I'll give it the benefit of the doubt here and say tie or even who cares.
Performance
RubyMine gobbles up memory. 30 minutes of editing the rails codebase and it is using 703 MB of RAM! Vim is using 11 MB of RAM. RubyMine is slow to startup, and has occasional performance hiccups too. Vim wins.
Cost
RubyMine costs 100$ for a commercial license. Vim is open source. Good Karma. Vim wins.
Learning Curve
Vim requires you to know all sorts of arcane commands and to be really productive you need lots of plugins. So the learning curve is quite steep. RM has a much more intuitive interface and is ready to go out of the box. Edge RM
Conclusion
Ok, RM wins but with an asterisk. RM has the advantage of being completely focused on Ruby, HTML and JavaScript. It does one thing and does it well. Vim on the other hand will happily highlight and edit nearly every programming language or filetype known to man (or machine). 20 years down the road when Rails is a dinosaur, the new COBOL, and you have moved on to working in language X, your RubyMine skills will be irrelevant while the Vim you picked up might still be serving you well... But yea, most people will probably be slightly more productive in RubyMine. So what do you do? I don't know, so I say just learn them both and use them both.
3 comments:
Thank you for that informative post. I currently use MacVim for Ruby editing, but have been wondering about investing in RubyMine. Instead I think I'll just clone your github .vim.
Your comment about "20 years down the road" made me chuckle; I started using vi on SCO Unix 20 years ago, writing C code. Haven't used plain C in anger for at least half that time, yet vi/vim has remained constant throughout.
Thanks for a great review! By the way, I did not notice you mentioning, do you use the IdeaVIM plugin for RubyMine? http://blogs.jetbrains.com/ruby/2009/08/rubymine-for-vim-addicts/
Should make using RubyMine more comfortable for you.
Thanks,
-Eugene (RubyMine team)
Great comparison. However, I'd say that many RubyMine "skills" will carry over to other languages because they follow standard OS key bindings and are generally applicable at least conceptually. I have yet to hear any argument that would make me consider using VIM. It's just completely unintuitive. Maybe my opinion will change someday, but I really doubt it.
Post a Comment