From 5270670c0bc987edb969c5d8b34a42fcca6b1031 Mon Sep 17 00:00:00 2001 From: mattn Date: Sat, 20 Feb 2010 00:45:33 +0900 Subject: [PATCH] fixed single line behavior. --- zencoding.vim | 19 +++++++++++-------- zencoding.vim.vimup | 8 +++++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/zencoding.vim b/zencoding.vim index 17488b1..09414c9 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -1,8 +1,8 @@ "============================================================================= " File: zencoding.vim " Author: Yasuhiro Matsumoto -" Last Change: 19-Feb-2010. -" Version: 0.8 +" Last Change: 20-Feb-2010. +" Version: 0.9 " WebPage: http://github.com/mattn/zencoding-vim " Description: vim plugins for HTML and CSS hi-speed coding. " SeeAlso: http://code.google.com/p/zen-coding/ @@ -44,7 +44,7 @@ " " Tips: " -" You can customize behaviour of expanding with overriding config. +" You can customize behavior of expanding with overriding config. " This configuration will be marged at loading plugin. " " let g:user_zen_settings = { @@ -912,14 +912,14 @@ function! s:zen_toString(...) if len(type) == 0 | let type = 'html' | endif let indent = s:zen_settings['indentation'] - let m = 1 + let m = 0 let str = '' - while m <= current['multiplier'] + while m < current['multiplier'] if len(current['name']) && type == 'html' let str .= '<' . current['name'] for attr in keys(current['attr']) if current['multiplier'] > 1 && current['attr'][attr] =~ '\$$' - let str .= ' ' . attr . '="' . current['attr'][attr][:-2] . m . '"' + let str .= ' ' . attr . '="' . current['attr'][attr][:-2] . (m+1) . '"' else let str .= ' ' . attr . '="' . current['attr'][attr] . '"' endif @@ -937,9 +937,12 @@ function! s:zen_toString(...) let str .= " />\n" else if stridx(','.s:zen_settings[type]['block_elements'].',', ','.current['name'].',') != -1 && len(current['child']) - let str .= ">\n" . inner . "|\n" + let str .= ">\n" . inner . "|aa\n" else - let str .= ">" . inner . "|\n" + let str .= ">" . inner . "|" + if current['multiplier'] > 1 + let str .= "\n" + endif endif endif endif diff --git a/zencoding.vim.vimup b/zencoding.vim.vimup index c15ae42..172df6c 100644 --- a/zencoding.vim.vimup +++ b/zencoding.vim.vimup @@ -2,7 +2,7 @@ script_name: ZenCoding.vim script_id: '2981' script_type: utility script_package: zencoding.vim -script_version: '0.8' +script_version: '0.9' required_vim_version: '7.0' summary: vim plugins for HTML and CSS hi-speed coding. @@ -45,7 +45,7 @@ detailed_description: | Tips: - You can customize behaviour of expanding with overriding config. + You can customize behavior of expanding with overriding config. This configuration will be marged at loading plugin. let g:user_zen_settings = { @@ -67,12 +67,14 @@ install_details: | copy zencoding.vim to your plugin directory. versions: +- '0.9': | + This is an upgrade for ZenCoding.vim: fixed single line behavior - '0.8': | This is an upgrade for ZenCoding.vim: support 'a[href=http://www.google.com]{Google}' - '0.7': | This is an upgrade for ZenCoding.vim: fixed behavior in 'a+b'. - '0.6': | - This is an upgrade for ZenCoding.vim: fixed strange behaviour about 'b_'. + This is an upgrade for ZenCoding.vim: fixed strange behavior about 'b_'. - '0.5': | This is an upgrade for ZenCoding.vim: recover rest part in line. - '0.4': |