From: Philip Mak Date: 2002-08-17T07:07:29+09:00 Subject: Re: eruby editor --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="aspruby.vim" " Vim syntax file " Language: Active State's PerlScript (ASP) " Maintainer: Aaron Hope " 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 :p:h/html.vim syn include @AspPerlScript :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=+]*>+ end=++ contains=@AspPerlScript let b:current_syntax = "aspruby" --Qxx1br4bt0+wmkIi--