5

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?

TomCaps
  • 883

4 Answers4

2

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)
tdammers
  • 52,936
1

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.

0

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!

junky
  • 858
-1

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).

Doc Brown
  • 218,378