VIM Settings for ruby/rails dev

86 views
Skip to first unread message

Rob Dawson

unread,
Aug 3, 2012, 8:46:12 PM8/3/12
to rails-...@googlegroups.com
Hi all,

I've recently changed my day jobs, moving from a very open environment where I could do what I wanted to a more security conscious corporate environment. I'm looking at getting my dev environment setup at the new place, and considering making the move to vim for ruby coding.

In order to do this I'd love to get some advice on plugins/settings that people like to use for ruby dev. (I'll be using sinatra on JRuby using RVM).

My background for dev is that I've always used vi as my editor, but have leaned more towards other tools for programming. For Ruby dev I've used a mix of text mate, and ruby mine. I think one of the key things that I'd need to feel happy would be a good project/multi-file navigation tool. I'm also keen to get more general advice.

Thanks,

Rob


Rob Zolkos

unread,
Aug 4, 2012, 7:34:59 AM8/4/12
to rails-...@googlegroups.com
The best advice I can give is to start with as little plugins as possible and then only add them as you feel a gap needs to be filled.

For me (after moving from Textmate to VIM in early 2011), I only use the following :

vim-coffeescript
vim-commentary
vim-rails
vim-haml
vim-powerline

And Command-T for quickly finding files.

I also recommend watching this Destroy All Software screencast about Vim : https://www.destroyallsoftware.com/screencasts/catalog/some-vim-tips

Rob





--
You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group.
To post to this group, send email to rails-...@googlegroups.com.
To unsubscribe from this group, send email to rails-oceani...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.


Chris Corbyn

unread,
Aug 4, 2012, 7:55:04 AM8/4/12
to rails-...@googlegroups.com
Yeah, use it without plugins and start adding them as you need. If you use Vundle (my preference) or Pathogen to install plugins, it's all very easy to just install something and remove it if it doesn't seem to be of any benefit.

I went from TextMate to Emacs, which requires *a lot* of screwing around to make it useful. When I left Emacs and moved to Vim, despite the usual muscle-memory issues, I was pleasantly surprised how much Vim already did things I had to jump through hoops to get Emacs to do. You'll probably find you only really want a handful of plugins.

You can get some ideas from what Rob listed and the 'Bundle' lines in my vimrc https://github.com/d11wtq/dot-vim

Inviato da iPhone

Tate Johnson

unread,
Aug 4, 2012, 8:03:20 AM8/4/12
to rails-...@googlegroups.com
My former co-workers would instantly shout NERDTree for file navigation. It lets you do everything, but I've been content with NetRW. NetRW ships with Vim and I always keep it around in its own buffer. Between NetRW and Command-T I can get around just fine.

If you're going to install plugins, you may want to look into Vundle. Vundle is to Vim as Bundler is to Ruby.

https://github.com/gmarik/vundle/

Take a look at my vimrc file if you're looking for some inspiration. I've tried to keep it quite lean.

https://github.com/tatey/dotfiles/blob/master/vimrc

Cheers,
Tate

Richard McGain

unread,
Aug 4, 2012, 10:40:43 AM8/4/12
to rails-...@googlegroups.com
I use Command-t and supertab and not much else. When I started using vim I had so many plugins but I found I used them so rarely, or they saved me so little time that it was just easier to remove them.

Richard

Dmytrii Nagirniak

unread,
Aug 5, 2012, 9:03:40 PM8/5/12
to rails-...@googlegroups.com
Hi Rob,

vim-rails and CommandT is all I would have started with.

Also I'd recommend to see these screencasts RE vim:

And I also wrote about a few tips (who hasn't!) here: http://approache.com/blog/increase-your-productivity-with-vim-and-terminal/

Cheers,
Dmytrii.


Reply all
Reply to author
Forward
0 new messages