On Sat, 17 Dec 2005, 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. 

It's a bit of a problem, I agree.  I usually create them when I
create the /if|def|do|case|module|class|while/ and create the contents after.

There have been limitations imposed on Ruby by having the parser
implemented in YACC which have come up before.  One is that it is
nontrivial to get really good error diagnostics out.

> Vim doesn't really match End statements with their keywords.

:he matchit

You need to do a little installation of matchit for it to work
properly, because vim defaults to behaving like VI.  
> 
> 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"?

Before you go to the trouble of all that, whwat is your vimrc like?
maybe there are more things you can turn on that will help.

Mine, somewhat pruned, is like this:
<quote>
set autoindent
set expandtab
set shiftwidth=2 " Mostly Ruby development -- std convention 2, not 4
set textwidth=68 " Do want this generally applied now...
"set ttyscroll=0
"
runtime ftplugin/man.vim
filetype plugin on     "if you want the ftplugin to run
filetype indent on     "if you want indenting support
syntax on
autocmd FileType * exec('setlocal dict+='.$VIMRUNTIME.'/syntax/'.expand('<amatch>').'.vim')
runtime plugin/matchit.vim

"nmap <M-R> :exe ":undo|:set paste|:normal .:set nopaste"

"Give a status line always
set ls=2
</quote>
> 
> Thanks
> 
> SteveT
>  
        Hugh