How to switch between files in Vim?

Gavin Sinclair gsinclair at
Sun Apr 30 05:27:16 EDT 2006

Hi folks,

Just wondering...

If you have a lot of files open in Vim, how do you switch to the one
you want in the easiest fashion?

In my Rails project, there are lots of files (models, views,
controllers, helpers, javascript, etc.) and I need to flick around
between them.  I use and highly recommend the Project plugin, but
ideally I could just type in a few characters from the filename and go

The perfect interface would be something like this.  Say I want to
switch to "user_controller.rb".

  - CTRL-G (for Goto file) pops up a small window where I can type
    letters and it can display some matching filenames

  - I type "user" and it narrows it down to about 6 files

  - I hit space and type "cont", which is enough to score a unique match

  - I hit ENTER and that file opens

Now that's not really achievable with the interface Vim has, but I'm wondering:

  - Does anybody know a plugin that provides this as best it can?

  - Does anybody have a different approach they use for selecting files?

A bit off topic, I know!


More information about the vim-ruby-devel mailing list