Skip to content

Commit

Permalink
enable convertion of '!' to '!important'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Mar 16, 2010
1 parent a2a8882 commit 76b476e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zencoding.vim
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ function! s:zen_parseIntoTree(abbr, type)
endif

let abbr = substitute(abbr, '\([a-zA-Z][a-zA-Z0-9]*\)+\([()]\|$\)', '\="(".s:zen_expandos(submatch(1), type).")".submatch(2)', 'i')
let mx = '\([+>]\|<\+\)\{-}\s*\((*\)\{-}\s*\([@#]\{-}[a-zA-Z][a-zA-Z0-9:\!\-]*\|{[^}]\+}\)\(\%(\%(#[a-zA-Z0-9_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.[a-zA-Z0-9_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\s*\*\s*\([0-9]\+\)\s*\)\{0,1}\(\%(\s*)\%(\s*\*\s*[0-9]\+\s*\)\{0,1}\)*\)'
let mx = '\([+>]\|<\+\)\{-}\s*\((*\)\{-}\s*\([@#]\{-}[a-zA-Z\!][a-zA-Z0-9:\!\-]*\|{[^}]\+}\)\(\%(\%(#[a-zA-Z0-9_\-\$]\+\)\|\%(\[[^\]]\+\]\)\|\%(\.[a-zA-Z0-9_\-\$]\+\)\)*\)\%(\({[^}]\+}\)\)\{0,1}\%(\s*\*\s*\([0-9]\+\)\s*\)\{0,1}\(\%(\s*)\%(\s*\*\s*[0-9]\+\s*\)\{0,1}\)*\)'
let root = { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'multiplier': 1, 'parent': {}, 'value': '', 'pos': 0 }
let parent = root
let last = root
Expand Down Expand Up @@ -1353,6 +1353,9 @@ function! s:zen_expandAbbr(mode) range
else
let part = matchstr(line, '\(\S.*\)$')
endif
if part =~ '!'
let part = substitute(part, '.*!', '!', '')
endif
let rest = getline('.')[len(line):]
let str = part
let mx = '|\(\%(html\|haml\|e\|c\|fc\|xsl\)\s*,\{0,1}\s*\)*$'
Expand Down

0 comments on commit 76b476e

Please sign in to comment.