Is there any command to go to the end (or beginning) of a Ruby block using vim

ruby, vim

Solution

Looks like there is an official package at rubyforge that has some support for this:

The Ruby ftplugin now includes Ruby specific implementations for the [[, ]], [], ][, [m, ]m, [M, and ]M normal mode commands. These allow you to move to move quickly between module, class and method declarations.

Edit: The README says that these files are included in the default VIM distro but they don't work for me in GVIM on Windows, '{' and '}' seem to work on vim under Linux

Problem

Is there a way to go the end of a Ruby block using vim? For example ``` module SomeModule # <Supposing that the cursor is HERE> def some_method end end ``` I want to go from where the cursor is, to the end of the block with one command, is that possible? I've read this documentation, but it doesn't seem to work on .rb files, I've read in some places that it only works on C (haven't tried though). Thanks in advance.

Original source