1
0
Fork 0
mirror of synced 2024-12-22 23:18:56 -05:00
ultimate-vim/sources_non_forked/vim-less/after/syntax/html.vim

27 lines
837 B
VimL
Raw Normal View History

2014-09-27 11:32:18 -04:00
if !exists("g:less_html_style_tags")
let g:less_html_style_tags = 1
endif
if !g:less_html_style_tags
finish
endif
" Unset (but preserve) so that less will run.
if exists("b:current_syntax")
let s:pre_less_cur_syn = b:current_syntax
unlet b:current_syntax
endif
2014-09-27 11:32:18 -04:00
" Inspired by code from github.com/kchmck/vim-coffee-script
" and the html syntax file included with vim 7.4.
syn include @htmlLess syntax/less.vim
" We have to explicitly add to htmlHead (containedin) as that region specifies 'contains'.
syn region lessStyle start=+<style [^>]*type *=[^>]*text/less[^>]*>+ keepend end=+</style>+ contains=@htmlLess,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc containedin=htmlHead
" Reset since 'less' isn't really the current_syntax.
if exists("s:pre_less_cur_syn")
let b:current_syntax = s:pre_less_cur_syn
endif