# VIM with Ruby Rails?

**URL:** <https://www.ruby-forum.com/t/vim-with-ruby-rails/81179>\
**Category:** Rails\
**Created:** [January 5, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/vim-with-ruby-rails/81179 "2007-01-05T23:11:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lewis\_Grann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@Lewis\_Grann](https://www.ruby-forum.com/u/Lewis_Grann)\
**Post date:** [January 5, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/vim-with-ruby-rails/81179/1 "2007-01-05T23:11:40Z")

</div>

I assume we have people on this board using VIM 7.0+ and Rails together.  
I’ve been wondering what plug-ins, add-ons, scripts, etc. people are  
using with VIM. In particular I’m interested in how people manage their  
files (Textmate has that handy drawer and the concept of ‘projects’ to  
it all organized). How can I do this type of thing with VIM? Or can I?

Also, it seems the Ruby/Rails intellisense/autocomplete in VIM 7 is a  
bit flaky. I have to hit CTRL-X, CTRL-O in order to prompt it, then I  
cannot type the letters of the method I’m looking it just goes beserk.  
What is the correct way to use this?

Lewis Grann

- VIM n00b

(I own Textmate, but my remote servers are Linux based and I have to  
occasionally edit files remotely and VIM is that way I plan to do this.)

---

<div class="post-metadata">

**Author:** ![Lewis\_Grann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@Lewis\_Grann](https://www.ruby-forum.com/u/Lewis_Grann)\
**Post date:** [January 6, 2007, 12:35am UTC](https://www.ruby-forum.com/t/vim-with-ruby-rails/81179/2 "2007-01-06T00:35:52Z")

</div>

Lewis Grann wrote:

> I assume we have people on this board using VIM 7.0+ and Rails together.  
> I’ve been wondering what plug-ins, add-ons, scripts, etc. people are  
> using with VIM. In particular I’m interested in how people manage their  
> files (Textmate has that handy drawer and the concept of ‘projects’ to  
> it all organized). How can I do this type of thing with VIM? Or can I?
> 
> Also, it seems the Ruby/Rails intellisense/autocomplete in VIM 7 is a  
> bit flaky. I have to hit CTRL-X, CTRL-O in order to prompt it, then I  
> cannot type the letters of the method I’m looking it just goes beserk.  
> What is the correct way to use this?
> 
> Lewis Grann
> 
> - VIM n00b
> 
> (I own Textmate, but my remote servers are Linux based and I have to  
> occasionally edit files remotely and VIM is that way I plan to do this.)

The only thing I’ve done is create a single mapping to turn F2 and F3  
into next buffer and previous buffer. Then I simple load all the files  
that I will be working with and switch between them as needed. I use  
the ‘sh’ command to drop to the shell to run tests then ‘exit’ back into  
vim, with everything just like I left it. I don’t really miss having  
the project view to much.

I did recently see some one mention writing a script to launch vim, one  
that would load all the appropriate models/views/controllers for each  
argument passed it. Meaining, for example, if you did ‘ed users’ it  
would launch vim with “app/controllers/users\_controller.rb”,  
“app/models/user.rb”, and everthing in “app/views/users/\*”. Of course  
this would work for any editor and can be customized how ever you want.

I’ve never been a real fan of intellisense/autocomplete and have it  
turned off so I can’t really say much about that.

---

<div class="post-metadata">

**Author:** ![Lewis\_Grann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@Lewis\_Grann](https://www.ruby-forum.com/u/Lewis_Grann)\
**Post date:** [January 16, 2007, 10:53am UTC](https://www.ruby-forum.com/t/vim-with-ruby-rails/81179/3 "2007-01-16T10:53:41Z")

</div>

On 5 Jan 2007, at 22:11, Lewis Grann wrote:

> I assume we have people on this board using VIM 7.0+ and Rails  
> together.  
> I’ve been wondering what plug-ins, add-ons, scripts, etc. people are  
> using with VIM.

Tim Pope’s rails.vim plugin is excellent:

[http://www.vim.org/scripts/script.php?script\_id=1567](http://www.vim.org/scripts/script.php?script_id=1567)

The Vim-Rails wiki page is quite helpful too:

[http://wiki.rubyonrails.org/rails/pages/HowtoUseVimWithRails](http://wiki.rubyonrails.org/rails/pages/HowtoUseVimWithRails)

> In particular I’m interested in how people manage their  
> files (Textmate has that handy drawer and the concept of ‘projects’ to  
> it all organized). How can I do this type of thing with VIM? Or  
> can I?

There are various plugins which do this – just search for “Vim file  
explorer”. My favourite is the Buffer Explorer, although it doesn’t  
sound like quite what you are after:

[http://www.vim.org/scripts/script.php?script\_id=42](http://www.vim.org/scripts/script.php?script_id=42)

> Also, it seems the Ruby/Rails intellisense/autocomplete in VIM 7 is a  
> bit flaky. I have to hit CTRL-X, CTRL-O in order to prompt it, then I  
> cannot type the letters of the method I’m looking it just goes beserk.  
> What is the correct way to use this?

Try Ctrl-n. I find I have to use the cursor keys (yuk) to reach the  
match I want.

Regards,  
Andy S.
