Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am switching from C#+Visual Studio to Ruby+Vim for a few months. The only thing that I am missing from C#/Visual Studio is intellisense, especially when I have a new ruby gem to familiarize.

As a programmer with a below-average memory like Joel, I miss the a happy time in Visual Studio that I can Ctrl+Space everywhere to get a hint list so that I don't have to memorize a single method , whether it's name or it's parameter list. I can even get it's usage/sample code at MSDN with only a press of F1.

So, ruby(dynamic typing language)+vim/TextMate programmers, when you are coding

Do you run google/gem API reference manual/irb/ri side by side with your vim/TextMate like me most of the time ?

or A Good memory is a must-have for ruby(or other dynamic language) programmers?

share|improve this question

closed as primarily opinion-based by gnat, Corbin March, jmo21, mattnz, Michael Kohne Aug 20 '13 at 19:26

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Leave the vim for hardcore people. Use IDE, it's a lot more effective. I tried coding without Intellisense, and meh, no way I'm doing that again. I have the same problem, I have better things to memorize than method and variable names. –  Coder Feb 29 '12 at 14:09

4 Answers 4

up vote 1 down vote accepted

I ran into something similar with python. I wanted vim, but I also wanted IDE features. So I ended up rolling my own with vim plugins.

For what you want, get supertab for easy autocomplete, including dynamic method completion. Not quite as effective as an IDE, but it works. Also get snipmate for snippets.

Finally, get ConqueShell. That's very important, because it allows you to run a ruby shell inside a vim buffer! Don't know what command to use? Flip buffers, and test it. There should also be built in method help and autocompletion provided by the ruby shell.

I use conque for running ipython, which works great. I can even navigate the buffer and use vim's yank syntax for copying into a code window.

share|improve this answer

A few things that help:

  • vim has auto-completion (Ctrl-n), though it is not syntax-aware
  • a tags file (generated by exuberant-ctags or another appropriate tool) helps tons: not only does it extend the auto-completion's vocabulary, it also allows jumping through the code file using the 'tag stack' - Ctrl-] takes you to the definition of whatever the cursor is on, Ctrl-t pops you back where you came from
  • consistent naming and a DRY coding style
  • a tiling window manager and multiple screens (I prefer to have at least three: one for the code, one for the running application, one for documentation)
share|improve this answer
    
Yea most of what you can do in an IDE you can also do in VIM Or emacs, and they use a LOT less system resources –  Zachary K Feb 29 '12 at 14:59
    
@ZacharyK: I actually find that I am most productive with vim when I embrace its style instead of trying to bend it into an IDE. Dumb autocomplete may not give you inline documentation and all that, but it does work reliably and predictably for all languages in all contexts - even when writing English prose. Instead of Integrating the Development Environment, I like to de-integrate it and make use of the strengths of a modular OS: anything that can read text and spits out transformed text is a candidate for my toolbox. –  tdammers Feb 29 '12 at 20:06

rubyMine is pretty amazing and shows a lot more suggestions and has much better auto-complete than Eclipse or netBeans.
Don't kick it until you try it! Free for 30 day trial anyway!

share|improve this answer

I did not try it on my own, but this link may provide what you are looking for:

http://vootey.wordpress.com/2010/03/28/ruby-code-completion-with-vim/

(google for "vim ruby code completion" to find more links).

share|improve this answer
    
thanks! but many of the methods in a gem are generated at runtime (like ghost methods). It's impossible to list these methods even in an IDE like RubyMine, not to mention vim. –  TomCaps Feb 29 '12 at 13:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.