Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one quickly access ruby and rails documentation when using vim?

What method are vim users out there using to quickly access documentation for both ruby and rails (other than switching to the browser to use ruby-doc or railsapi?).

I was trying to adapt this script (http://vim.wikia.com/wiki/Online_documentation_for_word_under_cursor) to do the trick however it's only going to work if the cursor is over a class name and I'd like it to work with both class and methods.

Thanks.

like image 275
46and2 Avatar asked Jan 15 '11 01:01

46and2


1 Answers

Seems like you may have answered this yourself with that function, but there are a couple of existing Vim plugins that can access ri on-the-fly within Vim. I use PA_ruby_ri. You might also try ri-browser and ruby-menu, though I can't personally vouch for either of them.

like image 156
michaelmichael Avatar answered Oct 05 '22 22:10

michaelmichael