From cb4f0d116e48dfb0d55c02f7f88951f7a51a1f69 Mon Sep 17 00:00:00 2001 From: mattn Date: Fri, 19 Feb 2010 16:33:03 +0900 Subject: [PATCH] fixed line expanding. --- zencoding.vim | 7 ++++++- zencoding.vim.vimup | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/zencoding.vim b/zencoding.vim index 4e2b9a3..b2fae23 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -945,7 +945,12 @@ function! s:zen_expand() let size = len(line) - len(part) let indent = repeat(s:zen_settings['indentation'], size) let expand = indent . substitute(expand, "\n", "\n" . indent, 'g') - call setline(line('.'), split(expand, '\n')) + let oldautoindent = &autoindent + let lines = split(expand, '\n') + call setline(line('.'), lines[0]) + if len(lines) > 1 + call append(line('.'), lines[1:]) + endif return '' endif return '|' diff --git a/zencoding.vim.vimup b/zencoding.vim.vimup index e9e0543..f538de7 100644 --- a/zencoding.vim.vimup +++ b/zencoding.vim.vimup @@ -3,7 +3,7 @@ script_id: '2981' script_type: utility script_package: zencoding.vim script_version: '0.2' -required_vim_version: '7.2' +required_vim_version: '7.0' summary: vim plugins for HTML and CSS hi-speed coding. detailed_description: |