fixed single line behavior.

This commit is contained in:
mattn
2010-02-20 00:45:33 +09:00
parent f79e0bfcd7
commit 5270670c0b
2 changed files with 16 additions and 11 deletions

View File

@@ -1,8 +1,8 @@
"=============================================================================
" File: zencoding.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" 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 . "|</" . current['name'] . ">\n"
let str .= ">\n" . inner . "|</" . current['name'] . ">aa\n"
else
let str .= ">" . inner . "|</" . current['name'] . ">\n"
let str .= ">" . inner . "|</" . current['name'] . ">"
if current['multiplier'] > 1
let str .= "\n"
endif
endif
endif
endif

View File

@@ -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 '<a href="">b_</a>'.
This is an upgrade for ZenCoding.vim: fixed strange behavior about '<a href="">b_</a>'.
- '0.5': |
This is an upgrade for ZenCoding.vim: recover rest part in line.
- '0.4': |