views:

187

answers:

6

Getting ready to try out vim or emacs for rails development. Does one of these support rails development any better than the other? This is on windows if that matters.

Edit

I'm not looking for reasons why or why not to use vim or emacs and I don't want opinions on which is a better editor. I mainly just want to know if one or the other has more/better tools or plugins for using rails, or are they about the same?

A: 

I personally only use vim for editing configuration files, or when I need to program on a machine that's not mine. Try Eclipse with one of the plugins, like Aptana.

Novikov
I've tried Aptana and Netbeans. I'd like to try out emacs or vim, though to see what the craze is all about.
NotDan
+1  A: 

Recently (few months ago) I've switched from RubyMine (around €90) to VIM (exactly €0) and I'm really happy with that.

It's not easy to describe why it's better but one thing I love about VIM is that I don't need mouse anymore. It probably sounds funny but I feel much happier without a mouse - because it frees me from the table.

In VIM you'll find helluva lot of nice features - just google around. For example one of the best is ci" which will delete all text inside " and you can start writing. But there are many many others.

The full blown IDE's are IMHO useless for Ruby and other dynamic languages. Their best features like: refactoring, code completition, syntax checking, etc. simply doesn't work. Or worst - works on 80% percent. And they will never work as Rails are full of eval(some_text_that_generates_methods)

I can't speak for Emacs as I've never used it.

I'm not sure how is it on Windows platform as I'm on Mac/Linux. But it should be similar.

UPDATE: Ah, I forgot to provide a link to nice VIM setup for Ruby on Rails: http://github.com/akitaonrails/vimfiles

If you follow the README you will have a working environment ready in a minute. There are many useful plugins in this repository (git submodules to be exact) - just take a look inside.

pawien
LOL, there is RubyMine ad banner just right of the my post. What a coincidence :-)
pawien
Got the vimfiles, is there an overview anywhere of what's in here and how to use these? Or do you just have to check out each of the modules and see what they do?
NotDan
yup, you have to check it yourself - most of them are here http://github.com/akitaonrails/vimfiles/tree/master//bundle/ or /plugin. It is opinionated list and it will probably not suit everyone. For example I don't like surround plugin and I removed it from my VIM config. And I've made some other little changes (handling TAB key, etc.).
pawien
A: 

Although EMacs is a very very powerful tool, the learning curve is unbelievable huge (in my experience) and tends to be overkill for most needs. Running in windows, will also be a damper because you'll be switching from the two extremes - all command line and all gui. I think VIM is a great editor, and as pointed out, Yahuda Katz wrote about how he converted to Vim from textmate.

My vote's for Vim (It's what I use for Rails).

Don't be surprised if after a while in your windows programs and editors (e.g. Visual Studio and Notepad) you're trying to use your vim keystrokes.

MunkiPhD
yup - that's absolutely true - more than often I write jjjjj in Word before I realize where I am :-)
pawien
+2  A: 

Emacs is quite good with Rails when you include the rinari minor mode, and ruby-electric-mode (which comes with the Rails source) is also nice -- more here. That said, it is a bit of a struggle to set up and the learning curve is steep.

zetetic
A: 

I don't know about Ruby, but emacs has more and better tools allover, autocomplete, syntax highlighting and general options editing is easier and prettier, and easier to writes plugins for, too. On the other hand, what's been said is true: it's a steeeeeeeeep learning curve, and overkill for most tasks.

Also, you should tag this question [holy-war]

Lacrymology
+2  A: 

Vim has rails.vim, a great plugin to help in Rails development. I'm not aware of anything comparable for Emacs. To get the feeling just take a look at the rails.vim screencast.

Adam Byrtek