diff --git a/autoload/zencoding.vim b/autoload/zencoding.vim index cad6726..b868aa1 100644 --- a/autoload/zencoding.vim +++ b/autoload/zencoding.vim @@ -66,7 +66,7 @@ function! s:zen_parseIntoTree(abbr, type) let rabbr = s:zen_getExpandos(type, abbr) if rabbr == abbr " try 'foo+(' to (foo-x) - let rabbr = substitute(abbr, '\%(+\|^\)\([a-zA-Z][a-zA-Z0-9+]\+\)+\([()]\|$\)', '\="(".s:zen_getExpandos(type, submatch(1)).")".submatch(2)', 'i') + let rabbr = substitute(abbr, '\%(+\|^\)\([a-zA-Z][a-zA-Z0-9+]\+\)+\([(){}>]\|$\)', '\="(".s:zen_getExpandos(type, submatch(1)).")".submatch(2)', 'i') endif let abbr = rabbr let mx = '\([+>]\|<\+\)\{-}\s*\((*\)\{-}\s*\([@#.]\{-}[a-zA-Z\!][a-zA-Z0-9:_\!\-$]*\|{.\{-}}\)\(\%(\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.{[{}a-zA-Z0-9_\-\$]\+\|\.[a-zA-Z0-9_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\s*\*\s*\([0-9]\+\)\s*\)\{0,1}\(\%(\s*)\%(\s*\*\s*[0-9]\+\s*\)\{0,1}\)*\)' @@ -658,12 +658,12 @@ function! s:zen_getFileType() if synIDattr(synID(line("."), col("."), 1), "name") =~ '^html' let type = 'html' endif - if synIDattr(synID(line("."), col("."), 1), "name") =~ '^xml' - let type = 'xml' - endif if synIDattr(synID(line("."), col("."), 1), "name") =~ '^javaScript' let type = 'javascript' endif + if len(type) == 0 && synIDattr(synID(line("."), col("."), 1), "name") =~ '^xml' + let type = 'xml' + endif if len(type) == 0 | let type = 'html' | endif return type endfunction @@ -2143,6 +2143,7 @@ let s:zen_settings = { \ 'var': 'xsl:variable', \ 'vari': 'xsl:variable', \ 'if': 'xsl:if', +\ 'choose': 'xsl:choose', \ 'call': 'xsl:call-template', \ 'wp': 'xsl:with-param', \ 'par': 'xsl:param',