editors

changeset 9:26e44046ec5f

* Added syntax hilighting for eTML, Euphoria embedded in HTML.
author Jeremy Cowgar <jeremy@cowgar.com>
date Mon Sep 07 01:20:20 2009 +0000 (2009-09-07)
parents 1a74a3ba12ca
children 876144e443d2
files vim/syntax/etml.vim
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/vim/syntax/etml.vim	Mon Sep 07 01:20:20 2009 +0000
     1.3 @@ -0,0 +1,56 @@
     1.4 +" Vim syntax file
     1.5 +" 
     1.6 +" Language:	Euphoria eTML
     1.7 +" Maintainer:	Jeremy Cowgar <jeremy@cowgar.com>
     1.8 +" Last Change:	2009-08-31
     1.9 +"
    1.10 +" Install:
    1.11 +"
    1.12 +" Add something like the following to your ~/.vim/filetype.vim
    1.13 +"
    1.14 +" augroup filetypedetect
    1.15 +"   au! BufRead,BufNewFile *.etml, *.etag setfiletype etml
    1.16 +" augroup END
    1.17 +" 
    1.18 +" Notes:
    1.19 +" 
    1.20 +" For version 5.x: Clear all syntax items
    1.21 +" For version 6.x: Quit when a syntax file was already loaded
    1.22 +if version < 600
    1.23 +	syntax clear
    1.24 +elseif exists("b:current_syntax")
    1.25 +	finish
    1.26 +endif
    1.27 +
    1.28 +if !exists("main_sytax")
    1.29 +	let main_syntax = 'etml'
    1.30 +endif
    1.31 +
    1.32 +if version < 600
    1.33 +	so <sfile>:p:h/html.vim
    1.34 +	syn include @EtmlEuphoria <sfile>:p:h/euphoria.vim
    1.35 +else
    1.36 +	runtime! syntax/html.vim
    1.37 +	unlet b:current_syntax
    1.38 +	syn include @EtmlEuphoria syntax/euphoria.vim
    1.39 +endif
    1.40 +
    1.41 +syn cluster htmlPreproc add=EuphoriaInsideHtmlTags
    1.42 +
    1.43 +syn region EutagHead start=+{{{+ end=+}}}+
    1.44 +syn region EuphoriaInsideHtmlTags keepend matchgroup=Delimiter start=+<%+ end=+%>+ contains=@EtmlEuphoria
    1.45 +
    1.46 +if version >= 508 || !exists("did_etml_syntax_inits")
    1.47 +	if version < 508
    1.48 +		let did_euphoria_syntax_inits = 1
    1.49 +		command -nargs=+ HiLink hi link <args>
    1.50 +	else
    1.51 +		command -nargs=+ HiLink hi def link <args>
    1.52 +	endif
    1.53 +
    1.54 +	HiLink EutagHead Error
    1.55 +endif
    1.56 +
    1.57 +let b:current_syntax = "etml"
    1.58 +
    1.59 +

SCM Home | OpenEuphoria.org Home