v-if, v-else, v-for word boundaries

This commit is contained in:
ManjaroOne666 2018-03-14 17:49:38 +00:00
parent b0df178249
commit e3257e5110
1 changed files with 14 additions and 0 deletions

14
vim/after/syntax/vue.vim Normal file
View File

@ -0,0 +1,14 @@
syn keyword vueComponentTag contained template containedin=htmlSpecialTagName
syn match vueDirective "\s[v:][-:.0-9_a-z]*" containedin=htmlTag,htmlTagN nextgroup=vueDirectiveValue
syn match vueEvent "\s[@][-:.0-9_a-z]*" containedin=htmlTag,htmlTagN nextgroup=vueEventValue
syn match vueConditional "\<v-else" containedin=htmlTag,htmlTagN
syn match vueConditional "\<v-if\|v-show" containedin=htmlTag,htmlTagN nextgroup=vueConditionalValue
syn match vueFor "\<v-for" containedin=htmlTag,htmlTagN nextgroup=vueForValue
syn match vueRef "\s:\?ref" containedin=htmlTag,htmlTagN nextgroup=vueRefValue
syn region vueDirectiveValue contained start=+="+hs=s+2 end=+"+he=e-1
syn region vueEventValue contained start=+="+hs=s+2 end=+"+he=e-1
syn region vueConditionalValue contained start=+="+hs=s+2 end=+"+he=e-1
syn region vueForValue contained start=+="+hs=s+2 end=+"+he=e-1
syn match vueRefValue contained +="[-:.0-9_a-z]*"+hs=s+2,he=e-1