Vim: Highlight keyword pairs in Ruby (def/end, do/end, etc)
VIM (until 7.2) can't highlight a closing 'if/end' pairs because the matching settings accepts a single character (see :help matchpairs).I recommend using folding instead, provided that you accurately indent your code:
:set foldmethod=indent
Then use: zc
, za
to make sure you're in the right block.
Looks like this vim plugin does paren-matching: http://vimdoc.sourceforge.net/htmldoc/pi_paren.htmlyou could probably dig into that code to see how to extend it to matching other things.