From 13994cc066a36e4316c838a8e98ad55b8a467054 Mon Sep 17 00:00:00 2001 From: mattn Date: Thu, 22 Aug 2013 19:55:53 +0900 Subject: [PATCH] html5ish --- autoload/emmet.vim | 8 ++++---- plugin/emmet.vim | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/autoload/emmet.vim b/autoload/emmet.vim index 296da87..1cc81b3 100644 --- a/autoload/emmet.vim +++ b/autoload/emmet.vim @@ -1393,9 +1393,9 @@ let s:emmet_settings = { \ 'meta:utf': [{'http-equiv': 'Content-Type'}, {'content': 'text/html;charset=UTF-8'}], \ 'meta:win': [{'http-equiv': 'Content-Type'}, {'content': 'text/html;charset=Win-1251'}], \ 'meta:compat': [{'http-equiv': 'X-UA-Compatible'}, {'content': 'IE=7'}], -\ 'style': {'type': 'text/css'}, -\ 'script': {'type': 'text/javascript'}, -\ 'script:src': [{'type': 'text/javascript'}, {'src': ''}], +\ 'style': g:emmet_html5 ? {} : {'type': 'text/css'}, +\ 'script': g:emmet_html5 ? {} : {'type': 'text/javascript'}, +\ 'script:src': g:emmet_html5 ? {'src': ''} : [{'type': 'text/javascript'}, {'src': ''}], \ 'img': [{'src': ''}, {'alt': ''}], \ 'iframe': [{'src': ''}, {'frameborder': '0'}], \ 'embed': [{'src': ''}, {'type': ''}], @@ -1515,7 +1515,7 @@ let s:emmet_settings = { \ 'empty_elements': 'area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,keygen,command', \ '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', -\ 'empty_element_suffix': ' />', +\ 'empty_element_suffix': g:emmet_html5 ? '>' : ' />', \ }, \ 'htmldjango': { \ 'extends': 'html', diff --git a/plugin/emmet.vim b/plugin/emmet.vim index f44b3cc..df4f7ce 100644 --- a/plugin/emmet.vim +++ b/plugin/emmet.vim @@ -1,7 +1,7 @@ "============================================================================= " File: emmet.vim " Author: Yasuhiro Matsumoto -" Last Change: 13-Aug-2013. +" Last Change: 22-Aug-2013. " Version: 0.82 " WebPage: http://github.com/mattn/emmet-vim " Description: vim plugins for HTML and CSS hi-speed coding. @@ -74,6 +74,10 @@ let g:loaded_emmet_vim = 1 let s:save_cpo = &cpo set cpo&vim +if !exists('g:emmet_html5') + let g:emmet_html5 = 1 +endif + if !exists('g:emmet_debug') let g:emmet_debug = 0 endif