# Vim and '%': no brackets, how to navigate instead?

**URL:** <https://www.ruby-forum.com/t/vim-and-no-brackets-how-to-navigate-instead/168544>\
**Category:** Ruby\
**Created:** [May 22, 2009, 6:29am UTC](https://www.ruby-forum.com/t/vim-and-no-brackets-how-to-navigate-instead/168544 "2009-05-22T06:29:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Markus\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c4cdca/32.png) [@Markus\_F](https://www.ruby-forum.com/u/Markus_F)\
**Post date:** [May 22, 2009, 6:29am UTC](https://www.ruby-forum.com/t/vim-and-no-brackets-how-to-navigate-instead/168544/1 "2009-05-22T06:29:57Z")

</div>

Hi,

coming from languages which extensively use brackets I’m very accustomed  
in using % to jump between start/end. How this is getting a bit tricky,  
if not to say “no possible” because of the lack of all the brackets  
(which I find refreshing, btw).

But I guess it’s not that easy, % would need to be able to jump between  
“class” and “end”, “if” and “end”, “while” and “end”, etc.

Is there an easy way to change this behavior or is there some kind of  
ready-made plugin available? I’m runnig gvim on win32 and although it  
has ruby support (compiled it; syntax files) it doesn’t seem to support  
this.

thanks,

- Markus

---

<div class="post-metadata">

**Author:** ![Markus\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c4cdca/32.png) [@Markus\_F](https://www.ruby-forum.com/u/Markus_F)\
**Post date:** [May 22, 2009, 6:34am UTC](https://www.ruby-forum.com/t/vim-and-no-brackets-how-to-navigate-instead/168544/2 "2009-05-22T06:34:03Z")

</div>

Markus F. wrote:

> Is there an easy way to change this behavior or is there some kind of  
> ready-made plugin available?

Yes:  
[http://vim-ruby.rubyforge.org/](http://vim-ruby.rubyforge.org/)

I also highly recommend:  
[http://www.vim.org/scripts/script.php?script\_id=1567](http://www.vim.org/scripts/script.php?script_id=1567)  
[http://www.vim.org/scripts/script.php?script\_id=39](http://www.vim.org/scripts/script.php?script_id=39)

---

<div class="post-metadata">

**Author:** ![Markus\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c4cdca/32.png) [@Markus\_F](https://www.ruby-forum.com/u/Markus_F)\
**Post date:** [May 22, 2009, 6:37am UTC](https://www.ruby-forum.com/t/vim-and-no-brackets-how-to-navigate-instead/168544/3 "2009-05-22T06:37:00Z")

</div>

Hi,

Jeff S. wrote:

> Markus F. wrote:
> 
> > Is there an easy way to change this behavior or is there some kind of  
> > ready-made plugin available?
> 
> Yes:  
> [http://vim-ruby.rubyforge.org/](http://vim-ruby.rubyforge.org/)

thanks, it works now. However, it was my own stupidity actually. I found  
that page already and I was reading about matchit but somehow wasn’t  
able to put the puzzle together.

For the record: gvim on Windows comes with everything already, it just  
that the matchit plugin resides in the macro/ dir of vim and to use it,  
it has to be in the plugin/ directory.

cheers,

- Markus
