From 8126a94272ded5c851b91f61f877e15c340ee5a4 Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 23 Apr 2012 15:26:44 +0900 Subject: [PATCH] fix abbr expandos. related #65 --- autoload/zencoding.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/zencoding.vim b/autoload/zencoding.vim index 6bacb2a..be50875 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}\)*\)'