merge lines. close issue #52

This commit is contained in:
mattn
2012-01-17 10:24:44 +09:00
parent 61ca294004
commit d4c971b7c4
4 changed files with 20 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
"=============================================================================
" zencoding.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" Last Change: 11-Jan-2012.
" Last Change: 17-Jan-2012.
let s:save_cpo = &cpo
set cpo&vim
@@ -999,6 +999,13 @@ function! zencoding#splitJoinTag()
endwhile
endfunction
function! zencoding#mergeLines() range
let lines = join(map(getline(a:firstline, a:lastline), 'matchstr(v:val, "^\\s*\\zs.*\\ze\\s*$")'), '')
let indent = substitute(getline('.'), '^\(\s*\).*', '\1', '')
silent! exe "normal! gvc"
call setline('.', indent . lines)
endfunction
function! zencoding#removeTag()
let curpos = getpos('.')
while 1