ri-browser : Ruby Information at your fingertips
script karma |
Rating 29/12,
Downloaded by 2441 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Jonas Fonseca |
|
script type |
ftplugin |
|
description |
Interface for browsing ri/ruby documentation.
Defines the following commands:
:Ri <arg>
Lookup the given argument.
:RiExpand <arg>
Lookup the given argument but prefix the class/module name
when in Ri class buffer[1].
and the following mappings:
<M-i> Clean prompting for lookup word.
<M-I> Prefix class/module if any before prompting. (ex: Array#)
Lookups can also be done using the word under the cursor (WUC)
<M-]>
Gready expansion of WUC. This will work for both the
'Array.new', 'Hash#each' and 'Kernel::block_given?' way of
specifying a method.
<M-[>
Not so gready expansion of WUC but will also prefix the
class/module when in a Ri class/module buffer[1]. This makes
it possible to lookup 'Array#each' by invoking it with
the cursor places on 'each' in the 'Array' class buffer.
[1] A Ri class/module buffer is a buffer showing all the methods belonging
to a class or modul. Example: typing ':Ri Hash' followed by enter in
normal mode with the ri plugin loaded will open the 'Hash' class buffer.
Comes with syntax coloring of the Ri buffer.
Inspired by ri stuff at http://www.rubygarden.org/ruby?VimExtensions
Credits to vimscript #90 for much of the lovely code. |
|
install details |
Unzip the installation file in you vim directory and it will 'install' the files:
ftplugin/ri.vim
syntax/ri.vim
doc/ri.txt
Then add something like
" Load ri interface
source path/to/ftplugin/ri.vim
to your ftplugin/ruby.vim to load it when editing ruby files.
For futher documentation on installation and usage take a look at the file doc/ri.txt |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 35.170.81.33
|