views:

189

answers:

4

I'm learning ruby on rails on a linux box and dusting off my VIM skills (skillz?).

alt text

When I got started on VIM way back in my c++ days, I had a friend with a great vimfiles folder that had tons of stuff to get started. Starting from scratch, vim is great, but it feels like it could be a lot better.

I currently have:

I know that barely scratches the surface of what some more experienced vim/ruby devs have (including the one offs in the vim.rc file).

Is there a list somewhere (or could we create one) of a bunch of the standard vim configurations needed to make programming ruby (and rails) more fun? Is there a zip/tarball somewhere with a good base setup?

+7  A: 

take a look at tim pope's repos on git hub. Many, many awesome vim plugins and extensions for working with ruby and rails

http://github.com/tpope

Jed Schneider
A: 

I have this in my ~/.vimrc to quickly see the output of a file I'm working on:

map <Leader>r :w! <bar> !ruby %<CR>

For rails, two essential plugins are rails.vim and the NERD tree, for navigating the directory of the rails project you're working on.

michaelmichael
A: 

snipMate (GitHub repo) is highly recommended. It enables you to use TextMate-style snippets in Vim.

snipMate is not Ruby-specific: by default, it comes with one file containing Ruby-specific snippets. If you are going to work a lot on Ruby-based code (Rails, RSpec, Shoulda, and the like), it's probably better to use one of the available snippets' collections and customize it as you see fit rather than writing your own snippets from scratch.

Yaser Sulaiman
A: 

There is a pretty nice setup for your VIM environment.

http://github.com/akitaonrails/vimfiles

Just follow the instructions and in a minute or two you will have everything ready for Ruby(on Rails) development.

As Jed has mentioned above - tpope plugin is a "must have" and it is part of the akita vimfiles.

pawien