few extensive notation.

This commit is contained in:
mattn
2010-02-21 22:48:14 +09:00
parent 41f172f5af
commit dc33430b98
2 changed files with 10 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
" File: zencoding.vim " File: zencoding.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> " Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" Last Change: 21-Feb-2010. " Last Change: 21-Feb-2010.
" Version: 0.11 " Version: 0.12
" 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/
@@ -798,7 +798,7 @@ function! s:zen_parseIntoTree(abbr, type)
" TODO : expandos " TODO : expandos
let abbr = substitute(abbr, '\([a-z][a-z0-9]*\)\+$', '\=s:zen_expandos(submatch(1), type)', 'i') let abbr = substitute(abbr, '\([a-z][a-z0-9]*\)\+$', '\=s:zen_expandos(submatch(1), type)', 'i')
let mx = '\([\+>]\|<\+\)\{-}\(@\{-}[a-z][a-z0-9:\!\-]*\|{[^}]\+}\)\(\%(\%(#[0-9A-Za-z_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.[0-9A-Za-z_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\*\([0-9]\+\)\)\{0,1}' let mx = '\([\+>#]\|<\+\)\{-}\(@\{-}[a-z][a-z0-9:\!\-]*\|{[^}]\+}\)\(\%(\%(#[0-9A-Za-z_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.[0-9A-Za-z_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\*\([0-9]\+\)\)\{0,1}'
let last = {} let last = {}
let parent = { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'multiplier': 1, 'parent': {}, 'value': '', 'brother': 0 } let parent = { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'multiplier': 1, 'parent': {}, 'value': '', 'brother': 0 }
let granma = parent let granma = parent
@@ -811,6 +811,11 @@ function! s:zen_parseIntoTree(abbr, type)
let attributes = substitute(match, mx, '\3', 'ig') let attributes = substitute(match, mx, '\3', 'ig')
let value = substitute(match, mx, '\4', 'ig') let value = substitute(match, mx, '\4', 'ig')
let multiplier = 0 + substitute(match, mx, '\5', 'ig') let multiplier = 0 + substitute(match, mx, '\5', 'ig')
if operator == '#'
let attributes = '#' . tag_name . attributes
let tag_name = 'div'
let operator = ''
endif
if multiplier <= 0 if multiplier <= 0
let multiplier = 1 let multiplier = 1
endif endif
@@ -889,7 +894,7 @@ function! s:zen_parseIntoTree(abbr, type)
endif endif
call add(parent['child'], current) call add(parent['child'], current)
let last = current let last = current
if 0 if 1
echo "str=".str echo "str=".str
echo "tag_name=".tag_name echo "tag_name=".tag_name
echo "operator=".operator echo "operator=".operator

View File

@@ -67,6 +67,8 @@ install_details: |
copy zencoding.vim to your plugin directory. copy zencoding.vim to your plugin directory.
versions: versions:
- '0.12': |
This is an upgrade for ZenCoding.vim: few extensive notation.
- '0.11': | - '0.11': |
This is an upgrade for ZenCoding.vim: fixed indent. This is an upgrade for ZenCoding.vim: fixed indent.
- '0.10': | - '0.10': |