fix: highlight for vue tag

This commit is contained in:
yemai
2018-09-28 18:00:42 +08:00
parent ee424ff59e
commit b9f9114eb8

View File

@@ -18,14 +18,12 @@ syn include @CSSSyntax syntax/css.vim
let b:current_syntax='vue'
" Find tag <script> / <style> and enable javascript / css syntax
syn region vueTemplate start=+<template\(\s.\{-}\)\?>+ end=+</template>+ keepend contains=@HTMLSyntax
syn region vueScript start=+<script\(\s.\{-}\)\?>+ end=+</script>+ keepend contains=@jsAll,jsImport,jsExport
syn region vueStyle start=+<style\(\s.\{-}\)\?>+ end=+</style>+ keepend contains=@CSSSyntax,@HTMLSyntax
syn region vueTemplate start=+<template\(\s.\{-}\)\?>+ end=+</template>+ keepend contains=@HTMLSyntax,vueTag
syn region vueScript start=+<script\(\s.\{-}\)\?>+ end=+</script>+ keepend contains=@jsAll,jsImport,jsExport,vueTag
syn region vueStyle start=+<style\(\s.\{-}\)\?>+ end=+</style>+ keepend contains=@CSSSyntax,@HTMLSyntax,vueTag
hi def link vueTag htmlTagName
hi! link vueTemplate vueTag
hi! link vueScript vueTag
hi! link vueStyle vueTag
syn match vueTag /\v(tempalte|script|style)/
" Officially, vim-jsx depends on the pangloss/vim-javascript syntax package
" (and is tested against it exclusively). However, in practice, we make some