From 31d903d390035ea4158dc70d49034673d993ad7b Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Tue, 17 May 2016 02:45:20 +0900 Subject: [PATCH] li>lorem --- autoload/emmet/lang/html.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/emmet/lang/html.vim b/autoload/emmet/lang/html.vim index abc979a..7db2257 100644 --- a/autoload/emmet/lang/html.vim +++ b/autoload/emmet/lang/html.vim @@ -144,8 +144,10 @@ function! emmet#lang#html#parseIntoTree(abbr, type) abort let tag_name = pmap[pname] elseif !empty(pname) && index(inlineLevel, pname) > -1 let tag_name = 'span' - else + elseif len(parent.child) == 0 let tag_name = 'div' + else + let tag_name = custom endif endif @@ -192,7 +194,7 @@ function! emmet#lang#html#parseIntoTree(abbr, type) abort for k in keys(custom_expands) if tag_name =~# k - let current.snippet = '${' . custom . '}' + let current.snippet = '${' . (empty(custom) ? tag_name : custom) . '}' let current.name = '' break elseif custom =~# k