Addition of some new files

Gavin Sinclair gsinclair at
Wed Feb 15 02:12:06 EST 2006

Hi Thomas,

Thanks for the contribution.  It's not overkill and you're not
treading on anyone's toes.  I'd love to see all of those things in the
vim-ruby distribution.

One issue is organising all those features: would they be switched on
by default?  I don't think so, because we don't want to trash people's
existing settings, like key-bindings.  So then, how do we make it
really easy to enable the features?  And I mean _really_ easy.

Also to do with organisation is a good set of keybindings that covers
everything, making them kind of predictable.  Perhaps it would be nice
to have one interface command, like :ruby_vim which takes arguments
like the following:

  :ruby_vim convert-block
  :ruby_vim fold-on-method
  :ruby_vim list-commands
  :ruby_vim help fold-on-method

Now it's me who's getting into overkill.  But anyway, this sort of
idea could be the basis for making it easy to manage all the tricks
that are implemented.  Of course, then you have key bindings to each
of those commands, like

  nunmap <M-r> :ruby-vim fold-on-method<CR>

as a completely made-up example.  The point is that it would be easy
for someone to see what the key bindings were, and change them if they

The next issue is documentation.  Of course, the great benefit of
incorporating this stuff into ruby-vim is that it can be documented
all in one place, with consistent layout and quality, etc.  The
downside is that someone has to do it.

So if you want to follow up on these ideas, Thomas, or invent a
management and documentation approach of your own, I'd love to see it.
 It would be included in an instant -- providing there's no serious
dissent from other list members.

One last thing, Thomas.  Are you aware of the snippets implementation
for Vim being worked on by Jeff Rose?  It's very powerful, very cool,
and another thing that will hopefully be worked into the distribution
before long.


On 2/10/06, Thomas Adam <thomas at> wrote:
>  Hello all,
>  I'm impressed with vim-ruby -- although I thought it would be nice to
>  include some addition files, especially the ones on
>  What I am proposing, isn't my own work.  Essentially they're vim files
>  that I have seen on the web, although all of them are under the GPL.  I
>  have made some modifications to some of the files.
>  From what I can currently tell, vim-ruby has indent, syntax and
>  compiler support, with ri support as well.  This is great, and it does
>  exactly what I would have expected.  However the files I'd like to see
>  distributed with it are the ones found in here:
>  block_eval is really useful in that it converts a block of code, hence:
>  [1,2,3].each {|a| p a}
>  into:
>  [1,2,3] do |a|
>    p a
>  end
>  ... and vice-versa, via the mapping ":B".
>  vim_folding does something similar for method definitions, via ":R"
>  (and :zi/:za).
>  ruby_structure -- this was from rubygarden -- essentially it allows
>  one to use Shift + Enter to ident and complete various code blocks.   I
>  can't tell you how useful this has been in the past.
>  ruby_xml -- probably my most favourite -- in-line evaluation.  Perhaps
>  better than irb in many ways.   I have the various functions of it
>  bound to F5, F6 and F7 -- this was shamelessly stolen from
> again.
>  You may consider this overkill -- I apologise in advance.  I certainly
>  do not wish to tread on anyone's toes as it were.  I was also thinking
>  of writing a simple menu vim file for gvim -- so that you could access
>  the various functions of these scripts.  Might make it more appealing
>  -- and I already have a something like it which I use for my own
>  purposes.
>  I am more than happy to help out however I can, of course.
> -- Thomas Adam
> --
> I've been too honest with myself, I should have lied like everybody else.
> _______________________________________________
> vim-ruby-devel mailing list
> vim-ruby-devel at

More information about the vim-ruby-devel mailing list