Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
VimL
branch: master

This branch is 4 commits ahead of vim-scripts:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ftplugin/ruby
README.markdown

README.markdown

ruby_matchit.vim

Deprecated. Use this instead.

Description

Matchit for Ruby: This function isn't very sophisticated. If you're on the line if ..., 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

Mappings

% : 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.

Changelist

2012-06-26 : First Release

Something went wrong with that request. Please try again.