Navigating Your Gems Code in Vim
Once again Tim Pope made my day, this time with two vim plugins and one ruby gem:
- gem-ctags - Automatic ctags generation on gem install
- rake.vim - It’s like rails.vim without the rails
- bundler.vim - Lightweight support for Ruby’s Bundler
After installing above you’ll be able to use the following shortcuts to navigate the code in your gems and bundles:
Ctrl+]
- jump to the method definitionCtrl+T
- go back
Simply open any of your project, position cursor to some method and play with above commands.
Autocompletion with Ctags
The tags file produced by Exuberant Ctags can be used for code completion,
simply press <Ctrl+X><Ctrl+]>
, it works fairly good with the same setup, but
not as smooth as for code navigation, unfortunately, unless I’m missing something.
Anyway if you find it good enough and also using supertab.vim than you can
switch your standard-completion method with :SuperTabHelp
and set it to
“tags”.