Deprecated. Use this instead.
Matchit for Ruby:
This function isn't very sophisticated. If you're on the line
then the cursor will jump to the next line with the same indentation
as the if-clause. The same is true for a whole bunch of keywords.
Since brave programmers use indentation, this will work for most of you, I hope. At least, it works for me. ;-)
Note: As this depends heavily on indentation, it won't work if the code is not properly indented.
Apart from the default behavior, this version has
- Enhanced navigation (see below)
- Removed mapping of \\\
- Cleaner code
% : Jump to next keyword ie. if/end -> elsif/else -> end etc.
A-% : Jump to previous keyword ie. elsif/else -> if
The default nature of % is to jump to the next keyword and hence,
in an if-else-end conditional, it keeps toggling between else and end.
Thus, to force to jump from else to if, Alt-% can be used.
2012-06-26 : First Release