forked from VimPlug/emmet-vim
don't screw up expansion if there's already an existing tag (#23)
<p>a>b_</p> now expands to <p><a><b>_</b></a></p> rather than <p> <a><b></b></a> </p></p>
This commit is contained in:
@@ -691,6 +691,9 @@ function! zencoding#expandAbbr(mode) range
|
|||||||
let part = matchstr(line, '\([a-zA-Z0-9_\@:|]\+\)$')
|
let part = matchstr(line, '\([a-zA-Z0-9_\@:|]\+\)$')
|
||||||
else
|
else
|
||||||
let part = matchstr(line, '\(\S.*\)$')
|
let part = matchstr(line, '\(\S.*\)$')
|
||||||
|
while part =~ '<.*>'
|
||||||
|
let part = substitute(part, '<.\{-}>', '', '')
|
||||||
|
endwhile
|
||||||
endif
|
endif
|
||||||
let rest = getline('.')[len(line):]
|
let rest = getline('.')[len(line):]
|
||||||
let str = part
|
let str = part
|
||||||
|
|||||||
Reference in New Issue
Block a user