From dc33430b98f58d3f11d1aaf6c77ace458ccb9370 Mon Sep 17 00:00:00 2001 From: mattn Date: Sun, 21 Feb 2010 22:48:14 +0900 Subject: [PATCH] few extensive notation. --- zencoding.vim | 11 ++++++++--- zencoding.vim.vimup | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/zencoding.vim b/zencoding.vim index 734e278..1aa95dc 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -2,7 +2,7 @@ " File: zencoding.vim " Author: Yasuhiro Matsumoto " Last Change: 21-Feb-2010. -" Version: 0.11 +" Version: 0.12 " 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/ @@ -798,7 +798,7 @@ function! s:zen_parseIntoTree(abbr, type) " TODO : expandos 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 parent = { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'multiplier': 1, 'parent': {}, 'value': '', 'brother': 0 } let granma = parent @@ -811,6 +811,11 @@ function! s:zen_parseIntoTree(abbr, type) let attributes = substitute(match, mx, '\3', 'ig') let value = substitute(match, mx, '\4', '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 let multiplier = 1 endif @@ -889,7 +894,7 @@ function! s:zen_parseIntoTree(abbr, type) endif call add(parent['child'], current) let last = current - if 0 + if 1 echo "str=".str echo "tag_name=".tag_name echo "operator=".operator diff --git a/zencoding.vim.vimup b/zencoding.vim.vimup index 1342e86..b79dc04 100644 --- a/zencoding.vim.vimup +++ b/zencoding.vim.vimup @@ -67,6 +67,8 @@ install_details: | copy zencoding.vim to your plugin directory. versions: +- '0.12': | + This is an upgrade for ZenCoding.vim: few extensive notation. - '0.11': | This is an upgrade for ZenCoding.vim: fixed indent. - '0.10': |