RbNav is a lightweight Vim plugin that helps you navigate the classes, modules, and methods in your Ruby project


Please check out my related Vim plugin ri.vim for Ruby documentation-browsing features.



gem install rb_nav && rb_nav_install

This installs the rb_nav.vim plugin into your ~/.vim/plugin directory.

To upgrade RbNav to a newer version, just repeat the installation procedure.


For the all the commands below, the mapleader is assumed to be ,. If it is \ or something else for your setup, use that instead.

Invoking the plugin

To change these keymappings, edit the two lines at the end of ~/.vim/plugin/rb_nav.vim.

Autocompletion is case-insensitive.

You can also match a fragment. So if you want to get to UsersController, you can type usersc and hit ENTER. This should be sufficient to bring up UsersController as long as that is the top match for the fragment usersc.

The search path

By default RbNav searches files using these grep command flags:

let g:RbNavPaths = " . --exclude-dir='\.git' --exclude-dir='vendor'  \
--exclude-dir='db' --include='*.rb' "

You can override these flags by reassigning g:RbNavPaths to something else in a .vimrc files in your project's root directory.

Bug reports and feature requests

Please submit them here:

About the developer

My name is Daniel Choi. I specialize in Ruby, Rails, MySQL, PostgreSQL, and iOS development. I am based in Cambridge, Massachusetts, USA.