Steve Litt wrote:
> Hi all,
>
> That's it, THAT'S IT! I'm tired of forgetting an end or inserting
> one too many, and traipsing through the whole program to find it.
> Vim doesn't really match End statements with their keywords.
>
> So I'm going to write an end matching program. Could somebody please
> list all the keywords that are ended by "end"? Do any of these
> keywords ever not end in "end"?

"class", "module", "def", "do", "begin", "while", "until", "if",
"unless" - control flow statements can be used as post expression in which
case they do not end in "end":

puts foo if foo > 10

You might be able to make your life easier by using a Ruby parser.  There
are even implementation(s) in Ruby.

Btw, there's an easier cure for this: just get used to typing the "end"
immediately after typing the starting token, then go back a word and type
the containing text.  Same works for all sorts of brackets etc.

Kind regards

    robert