From 4a0e7d1fb2494902cddbf06af452ca6ca5e68e94 Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 7 May 2012 16:27:35 +0900 Subject: [PATCH] fix $# contains &. --- autoload/zencoding.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/zencoding.vim b/autoload/zencoding.vim index 0eee62d..f708d4c 100644 --- a/autoload/zencoding.vim +++ b/autoload/zencoding.vim @@ -716,14 +716,14 @@ function! zencoding#expandAbbr(mode) range let lpart = substitute(lpart, '^[0-9.-]\+\s\+', '', '') let lpart = substitute(lpart, '\s\+$', '', '') endif - let expand = substitute(expand, '\$line'.(n-a:firstline+1).'\$', lpart, 'g') + let expand = substitute(expand, '\$line'.(n-a:firstline+1).'\$', '\=lpart', 'g') endfor let expand = substitute(expand, '\$line\d*\$', '', 'g') let content = join(getline(a:firstline, a:lastline), "\n") if stridx(expand, '$#') < len(expand)-2 let expand = substitute(expand, '^\(.*\)\$#\s*$', '\1', '') endif - let expand = substitute(expand, '\$#', content, 'g') + let expand = substitute(expand, '\$#', '\=content', 'g') else let str = '' if visualmode() ==# 'V'