keep whitespace on selection 'v'. related #69

This commit is contained in:
mattn
2012-05-06 00:53:05 +09:00
parent ad19b79b65
commit 13f4b677c9

View File

@@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" zencoding.vim " zencoding.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> " Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" Last Change: 02-May-2012. " Last Change: 06-May-2012.
let s:save_cpo = &cpo let s:save_cpo = &cpo
set cpo&vim set cpo&vim
@@ -745,7 +745,6 @@ function! zencoding#expandAbbr(mode) range
silent! normal! gvygv silent! normal! gvygv
let str = @" let str = @"
call setreg('"', save_regcont, save_regtype) call setreg('"', save_regcont, save_regtype)
"let str .= getline(a:firstline)
let items = s:zen_parseIntoTree(leader . "{".str."}", type).child let items = s:zen_parseIntoTree(leader . "{".str."}", type).child
endif endif
for item in items for item in items
@@ -802,7 +801,6 @@ function! zencoding#expandAbbr(mode) range
if a:firstline == a:lastline if a:firstline == a:lastline
let expand = substitute(expand, '\n\s*', '', 'g') let expand = substitute(expand, '\n\s*', '', 'g')
else else
let expand = substitute(expand, '\n\s*', '\n', 'g')
let expand = substitute(expand, '\n$', '', 'g') let expand = substitute(expand, '\n$', '', 'g')
endif endif
let expand = substitute(expand, '\${cursor}', '$cursor$', '') let expand = substitute(expand, '\${cursor}', '$cursor$', '')