" Vim syntax file " Language: haserl " Maintainer: http://haserl.sourceforge.net/ " Credits: Based on eruby.vim by Michael Brailsford " Installation: " Copy this file (haserl.vim) to your $VIMRUNTIME directory (for " example, /usr/share/vim/vim63/syntax, but this varies by system " and by version.) " " To automatilcally load this file when a haserl script is opened, " add the following lines to ~/.vim/scripts.vim: " " if did_filetype() " finish " endif " if getline(1) =~ '^#!.*[/\\]haserl\>' " setf haserl " endif " " You don't have to restart vim for this to take effect. It is a good " idea to read ":he new-filetype" so that you know what is going on, " and why the above works. if version < 600 syntax clear elseif exists("b:current_syntax") finish endif "Source the html syntax file ru! syntax/html.vim "Set the filetype to html to load the html ftplugins set ft=html unlet b:current_syntax let b:is_bash=1 "Put the shell syntax file in @shTop syn include @shTop syntax/sh.vim "List the haseral tags from 'largest' match first; otherwise, the pareser "will see <%in as matching <% and that is not what we want. syn region haserlIncl matchgroup=haserlDelim start=#<%in# end=#%># keepend containedin=ALL syn region haserlEval matchgroup=haserlDelim start=#<%=# end=#%># keepend containedin=ALL contains=@shTop syn region haserlExec matchgroup=haserlDelim start=#<%# end=#%># keepend containedin=ALL contains=@shTop "hi link haserlDelim todo hi link haserlIncl PreProc hi link haserlEval Comment hi link haserlExec Delimiter " vim: set ts=4 sw=4: