forked from VimPlug/emmet-vim
fixed single line behavior.
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" File: zencoding.vim
|
" File: zencoding.vim
|
||||||
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||||
" Last Change: 19-Feb-2010.
|
" Last Change: 20-Feb-2010.
|
||||||
" Version: 0.8
|
" Version: 0.9
|
||||||
" WebPage: http://github.com/mattn/zencoding-vim
|
" WebPage: http://github.com/mattn/zencoding-vim
|
||||||
" Description: vim plugins for HTML and CSS hi-speed coding.
|
" Description: vim plugins for HTML and CSS hi-speed coding.
|
||||||
" SeeAlso: http://code.google.com/p/zen-coding/
|
" SeeAlso: http://code.google.com/p/zen-coding/
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
"
|
"
|
||||||
" Tips:
|
" 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.
|
" This configuration will be marged at loading plugin.
|
||||||
"
|
"
|
||||||
" let g:user_zen_settings = {
|
" let g:user_zen_settings = {
|
||||||
@@ -912,14 +912,14 @@ function! s:zen_toString(...)
|
|||||||
if len(type) == 0 | let type = 'html' | endif
|
if len(type) == 0 | let type = 'html' | endif
|
||||||
|
|
||||||
let indent = s:zen_settings['indentation']
|
let indent = s:zen_settings['indentation']
|
||||||
let m = 1
|
let m = 0
|
||||||
let str = ''
|
let str = ''
|
||||||
while m <= current['multiplier']
|
while m < current['multiplier']
|
||||||
if len(current['name']) && type == 'html'
|
if len(current['name']) && type == 'html'
|
||||||
let str .= '<' . current['name']
|
let str .= '<' . current['name']
|
||||||
for attr in keys(current['attr'])
|
for attr in keys(current['attr'])
|
||||||
if current['multiplier'] > 1 && current['attr'][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
|
else
|
||||||
let str .= ' ' . attr . '="' . current['attr'][attr] . '"'
|
let str .= ' ' . attr . '="' . current['attr'][attr] . '"'
|
||||||
endif
|
endif
|
||||||
@@ -937,9 +937,12 @@ function! s:zen_toString(...)
|
|||||||
let str .= " />\n"
|
let str .= " />\n"
|
||||||
else
|
else
|
||||||
if stridx(','.s:zen_settings[type]['block_elements'].',', ','.current['name'].',') != -1 && len(current['child'])
|
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
|
else
|
||||||
let str .= ">" . inner . "|</" . current['name'] . ">\n"
|
let str .= ">" . inner . "|</" . current['name'] . ">"
|
||||||
|
if current['multiplier'] > 1
|
||||||
|
let str .= "\n"
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ script_name: ZenCoding.vim
|
|||||||
script_id: '2981'
|
script_id: '2981'
|
||||||
script_type: utility
|
script_type: utility
|
||||||
script_package: zencoding.vim
|
script_package: zencoding.vim
|
||||||
script_version: '0.8'
|
script_version: '0.9'
|
||||||
required_vim_version: '7.0'
|
required_vim_version: '7.0'
|
||||||
summary: vim plugins for HTML and CSS hi-speed coding.
|
summary: vim plugins for HTML and CSS hi-speed coding.
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ detailed_description: |
|
|||||||
|
|
||||||
Tips:
|
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.
|
This configuration will be marged at loading plugin.
|
||||||
|
|
||||||
let g:user_zen_settings = {
|
let g:user_zen_settings = {
|
||||||
@@ -67,12 +67,14 @@ install_details: |
|
|||||||
copy zencoding.vim to your plugin directory.
|
copy zencoding.vim to your plugin directory.
|
||||||
|
|
||||||
versions:
|
versions:
|
||||||
|
- '0.9': |
|
||||||
|
This is an upgrade for ZenCoding.vim: fixed single line behavior
|
||||||
- '0.8': |
|
- '0.8': |
|
||||||
This is an upgrade for ZenCoding.vim: support 'a[href=http://www.google.com]{Google}'
|
This is an upgrade for ZenCoding.vim: support 'a[href=http://www.google.com]{Google}'
|
||||||
- '0.7': |
|
- '0.7': |
|
||||||
This is an upgrade for ZenCoding.vim: fixed behavior in 'a+b'.
|
This is an upgrade for ZenCoding.vim: fixed behavior in 'a+b'.
|
||||||
- '0.6': |
|
- '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': |
|
- '0.5': |
|
||||||
This is an upgrade for ZenCoding.vim: recover rest part in line.
|
This is an upgrade for ZenCoding.vim: recover rest part in line.
|
||||||
- '0.4': |
|
- '0.4': |
|
||||||
|
|||||||
Reference in New Issue
Block a user