mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-11 04:51:52 +08:00
Use group_itemno or itemno that greating. close #118
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" zencoding.vim
|
" zencoding.vim
|
||||||
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||||
" Last Change: 09-Apr-2013.
|
" Last Change: 23-Apr-2013.
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
@@ -198,7 +198,7 @@ function! zencoding#toString(...)
|
|||||||
if len(current.value)
|
if len(current.value)
|
||||||
let text = current.value[1:-2]
|
let text = current.value[1:-2]
|
||||||
if dollar_expr
|
if dollar_expr
|
||||||
let text = substitute(text, '\%(\\\)\@\<!\(\$\+\)\([^{#]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
let text = substitute(text, '\%(\\\)\@\<!\(\$\+\)\([^{#]\|$\)', '\=printf("%0".len(submatch(1))."d", max([itemno, group_itemno])+1).submatch(2)', 'g')
|
||||||
let text = substitute(text, '\${nr}', "\n", 'g')
|
let text = substitute(text, '\${nr}', "\n", 'g')
|
||||||
let text = substitute(text, '\\\$', '$', 'g')
|
let text = substitute(text, '\\\$', '$', 'g')
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user