mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-06 18:54:27 +08:00
Add some workaround for #248
This commit is contained in:
@@ -1769,6 +1769,7 @@ let s:emmet_settings = {
|
|||||||
\ 'block_elements': 'address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6',
|
\ 'block_elements': 'address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6',
|
||||||
\ 'inline_elements': 'a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var',
|
\ 'inline_elements': 'a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var',
|
||||||
\ 'empty_element_suffix': g:emmet_html5 ? '>' : ' />',
|
\ 'empty_element_suffix': g:emmet_html5 ? '>' : ' />',
|
||||||
|
\ 'indent_blockelement': 0,
|
||||||
\ },
|
\ },
|
||||||
\ 'htmldjango': {
|
\ 'htmldjango': {
|
||||||
\ 'extends': 'html',
|
\ 'extends': 'html',
|
||||||
|
|||||||
@@ -509,9 +509,13 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite
|
|||||||
let inner = substitute(inner, "\n" . escape(indent, '\') . '$', '', 'g')
|
let inner = substitute(inner, "\n" . escape(indent, '\') . '$', '', 'g')
|
||||||
let str .= inner
|
let str .= inner
|
||||||
endfor
|
endfor
|
||||||
|
else
|
||||||
|
if settings.html.indent_blockelement && len(current_name) > 0 && stridx(','.settings.html.inline_elements.',', ','.current_name.',') == -1
|
||||||
|
let str .= "\n" . indent . '${cursor}' . "\n"
|
||||||
else
|
else
|
||||||
let str .= '${cursor}'
|
let str .= '${cursor}'
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
if dr
|
if dr
|
||||||
let str .= "\n"
|
let str .= "\n"
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user