mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-08 03:24:45 +08:00
Wrap what you see when leader contains {$#}
This commit is contained in:
@@ -533,8 +533,12 @@ function! emmet#expandAbbr(mode, abbr) range
|
|||||||
let str .= lpart . "\n"
|
let str .= lpart . "\n"
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
let leader .= (str =~ "\n" ? ">{\n" : "{") . str . "}"
|
if stridx(leader, '{$#}') != -1
|
||||||
let items = emmet#parseIntoTree(leader, type).child
|
let items = emmet#parseIntoTree(leader, type).child
|
||||||
|
else
|
||||||
|
let leader .= (str =~ "\n" ? ">{\n" : "{") . str . "}"
|
||||||
|
let items = emmet#parseIntoTree(leader, type).child
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
let save_regcont = @"
|
let save_regcont = @"
|
||||||
let save_regtype = getregtype('"')
|
let save_regtype = getregtype('"')
|
||||||
@@ -551,6 +555,9 @@ function! emmet#expandAbbr(mode, abbr) range
|
|||||||
let expand = substitute(expand, '<', '\<', 'g')
|
let expand = substitute(expand, '<', '\<', 'g')
|
||||||
let expand = substitute(expand, '>', '\>', 'g')
|
let expand = substitute(expand, '>', '\>', 'g')
|
||||||
endif
|
endif
|
||||||
|
if stridx(leader, '{$#}') != -1
|
||||||
|
let expand = substitute(expand, '\$#', '\="\n" . str', 'g')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
elseif a:mode == 4
|
elseif a:mode == 4
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
|
|||||||
Reference in New Issue
Block a user