VIM with Ruby Rails?

2 views
Skip to first unread message

Lewis Grann

unread,
Jan 5, 2007, 5:11:40 PM1/5/07
to rubyonra...@googlegroups.com
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.)

--
Posted via http://www.ruby-forum.com/.

Greg Donald

unread,
Jan 5, 2007, 5:17:14 PM1/5/07
to rubyonra...@googlegroups.com
On 1/5/07, Lewis Grann <rails-mai...@andreas-s.net> 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.

RailsEditor

http://rubyforge.org/projects/rails-editor/


--
Greg Donald
http://destiney.com/

Gregory Seidman

unread,
Jan 5, 2007, 6:09:36 PM1/5/07
to rubyonra...@googlegroups.com
On Fri, Jan 05, 2007 at 11:11:40PM +0100, 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?
[...]

You might look into VimMate: http://vimmate.rubyforge.org/

} Lewis Grann
} - VIM n00b

--Greg

Michael Greenly

unread,
Jan 5, 2007, 6:35:52 PM1/5/07
to rubyonra...@googlegroups.com

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.

Andrew Stewart

unread,
Jan 16, 2007, 4:05:01 AM1/16/07
to rubyonra...@googlegroups.com

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

The Vim-Rails wiki page is quite helpful too:

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


> 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 Stewart

Reply all
Reply to author
Forward
0 new messages