Philip,

The eruby syntax hack works great for me.  Thanks again.  You should 
submit this to the vim maintainers and see if they will add it to the 
next release.  If nothing else, you might get your name in some credits!

Kyle

Philip Mak wrote:
> On Sat, Aug 17, 2002 at 07:00:49AM +0900, Kyle Wilson wrote:
> 
>>Thanks for the responses.  I actually thought about creating syntax 
>>files for gvim, but I really wouldn't know where to start.  Plus, I 
>>think I'd rather just spend the time working on my project with eruby 
>>without the highlighting!
> 
> 
> I had a sudden burst of inspiration, and managed to create such a
> syntax file in 2 minutes. (I don't even know how to write vim syntax
> files! *laugh*)
> 
> All I did was take "aspperl.vim", which is what you want except that
> it uses Perl, and replace every occurance of 'perl' with 'ruby' and it
> worked. :)
> 
> Here's the attached file.
> 
> 
> ------------------------------------------------------------------------
> 
> " Vim syntax file
> " Language:	Active State's PerlScript (ASP)
> " Maintainer:	Aaron Hope <edh / brioforge.com>
> " URL:		http://nim.dhs.org/~edh/aspperl.vim
> " Last Change:	2001 May 09
> 
> " For version 5.x: Clear all syntax items
> " For version 6.x: Quit when a syntax file was already loaded
> if version < 600
>   syntax clear
> elseif exists("b:current_syntax")
>   finish
> endif
> 
> if !exists("main_syntax")
>   let main_syntax = 'rubyscript'
> endif
> 
> if version < 600
>   so <sfile>:p:h/html.vim
>   syn include @AspPerlScript <sfile>:p:h/ruby.vim
> else
>   runtime! syntax/html.vim
>   unlet b:current_syntax
>   syn include @AspPerlScript syntax/ruby.vim
> endif
> 
> syn cluster htmlPreproc add=AspPerlScriptInsideHtmlTags
> 
> syn region  AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+ skip=+".*%>.*"+ end=+%>+ contains=@AspPerlScript
> syn region  AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<script\s\+language="\=rubyscript"\=[^>]*>+ end=+</script>+ contains=@AspPerlScript
> 
> let b:current_syntax = "aspruby"