editors

changeset 29:3b58700d3c79

Fixed the eTML mode for vim, it's now fully functional
author Jeremy Cowgar <jeremy@cowgar.com>
date Thu Nov 11 13:53:24 2010 -0500 (2010-11-11)
parents 70eec38602e5
children 8062135a19d3
files vim/syntax/etml.vim
line diff
     1.1 --- a/vim/syntax/etml.vim	Thu Nov 11 11:55:50 2010 -0500
     1.2 +++ b/vim/syntax/etml.vim	Thu Nov 11 13:53:24 2010 -0500
     1.3 @@ -1,56 +1,48 @@
     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 -
    1.60 +" Vim syntax file
    1.61 +" 
    1.62 +" Language:     Euphoria eTML
    1.63 +" Maintainer:	Jeremy Cowgar <jeremy@cowgar.com>
    1.64 +" Last Change:	Thu Nov 11 13:02:09 EST 2010
    1.65 +"
    1.66 +" Install:
    1.67 +"
    1.68 +" Add something like the following to your ~/.vim/filetype.vim
    1.69 +"
    1.70 +" augroup filetypedetect
    1.71 +"   au! BufRead,BufNewFile *.etml,*.etag set ft=etml
    1.72 +" augroup END
    1.73 +" 
    1.74 +" Notes:
    1.75 +" 
    1.76 +" For version 5.x: Clear all syntax items
    1.77 +" For version 6.x: Quit when a syntax file was already loaded
    1.78 +if version < 600
    1.79 +	syntax clear
    1.80 +elseif exists("b:current_syntax")
    1.81 +	finish
    1.82 +endif
    1.83 +
    1.84 +if !exists("main_sytax")
    1.85 +	let main_syntax = 'etml'
    1.86 +endif
    1.87 +
    1.88 +if version < 600
    1.89 +	so <sfile>:p:h/html.vim
    1.90 +	syn include @EtmlEuphoria <sfile>:p:h/euphoria.vim
    1.91 +else
    1.92 +	runtime! syntax/html.vim
    1.93 +	unlet b:current_syntax
    1.94 +	syn include @EtmlEuphoria syntax/euphoria.vim
    1.95 +endif
    1.96 +
    1.97 +syn cluster htmlPreproc add=EuphoriaInsideHtmlTags
    1.98 +
    1.99 +syn region EutagHead start=+{{{+ end=+}}}+
   1.100 +syn region EuphoriaInsideHtmlTags keepend matchgroup=Delimiter start=+<%+ end=+%>+ contains=@EtmlEuphoria
   1.101 +
   1.102 +if version >= 508 || !exists("did_etml_syntax_inits")
   1.103 +	hi def link EutagHead Error
   1.104 +endif
   1.105 +
   1.106 +let b:current_syntax = "etml"
   1.107 +

SCM Home | OpenEuphoria.org Home