From cb7cb861848496f3d859f9ca7d3cd5862ca56f38 Mon Sep 17 00:00:00 2001 From: mattn Date: Tue, 24 Apr 2012 11:41:47 +0900 Subject: [PATCH] replace $# to content in the rest. --- autoload/zencoding.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoload/zencoding.vim b/autoload/zencoding.vim index b868aa1..ba2a0a5 100644 --- a/autoload/zencoding.vim +++ b/autoload/zencoding.vim @@ -711,6 +711,12 @@ function! zencoding#expandAbbr(mode) range 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', '') + echo expand + endif + let expand = substitute(expand, '\$#', content, 'g') else let str = '' if visualmode() ==# 'V'