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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With