router-link

This commit is contained in:
ManjaroOne666 2018-05-09 18:34:29 +01:00
parent ba26ec67f7
commit 81fa52d740
1 changed files with 17 additions and 13 deletions

View File

@ -2,13 +2,13 @@ runtime! after/syntax/html.vim
syn keyword vueComponentTag contained template containedin=htmlSpecialTagName
syn match vueDirective "\(^\|\s\)\zs[v:][-:.0-9_a-z]*" containedin=htmlTag,htmlTagN contains=vueDirectiveClass nextgroup=vueDirectiveValue
syn match vueEvent "\(^\|\s\)\zs[@][-:.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 vueSlot +\<slot=+he=e-1 containedin=htmlTag,htmlTagN nextgroup=vueSlotValue
syn match vueFor "\<v-for" containedin=htmlTag,htmlTagN nextgroup=vueForValue
syn match vueRef "\(^\|\s\)\zs:\?ref" containedin=htmlTag,htmlTagN nextgroup=vueRefValue
syn match vueDirective "\(^\|\s\)\zs[v:][-:.0-9_a-z]*" containedin=htmlTag,vueTag,htmlTagN contains=vueDirectiveClass nextgroup=vueDirectiveValue
syn match vueEvent "\(^\|\s\)\zs[@][-:.0-9_a-z]*" containedin=htmlTag,vueTag,htmlTagN nextgroup=vueEventValue
syn match vueConditional "\<v-else" containedin=htmlTag,vueTag,htmlTagN
syn match vueConditional "\<v-if\|\<v-show" containedin=htmlTag,vueTag,htmlTagN nextgroup=vueConditionalValue
syn match vueSlot +\<slot=+he=e-1 containedin=htmlTag,vueTag,htmlTagN nextgroup=vueSlotValue
syn match vueFor "\<v-for" containedin=htmlTag,vueTag,htmlTagN nextgroup=vueForValue
syn match vueRef "\(^\|\s\)\zs:\?ref" containedin=htmlTag,vueTag,htmlTagN nextgroup=vueRefValue
syn region vueDirectiveClass contained start=+class="+hs=s+7 end=+"+he=e-1 contains=vueObjectKey
syn region vueDirectiveValue contained start=+="+hs=s+2 end=+"+he=e-1
@ -30,12 +30,16 @@ syn match vueRefValue contained +='[-:.0-9_a-z]*'+hs=s+2,he=e-1
syn match vueSlotValue contained +"[-:.0-9_a-z]*"+hs=s+1,he=e-1
syn match vueSlotValue contained +'[-:.0-9_a-z]*'+hs=s+1,he=e-1
syn match vueComponentName contained "\(<\|</\)\zsvue-[0-9A-Za-z\-]\+\|\(<\|</\)\zs\u\+[0-9A-Za-z]\+\ze\(\s\|>\)" containedin=htmlTag,htmlTagN
syn match vueComponentName contained "\(<\|</\)\zsvue-[0-9A-Za-z\-]\+\|\(<\|</\)\zs\u\+[0-9A-Za-z]\+\ze\(\s\|>\)" containedin=htmlTag,vueTag,htmlTagN
syn region vueLink start="<router-link\>[^>]*" end="</router-link>"me=e-14 contains=@Spell,vueTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc,vueComponentName
syn region vueTag start=+<[^/]+ end=+>+ fold contained contains=htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,vueDynamicComponent
syn match vueComponentName contained "router-link" containedin=vueTag,htmlEndTag
hi! def link vueLink htmlLink
syn match vueDynamicComponent contained "\<component\>\|\<keep-alive\>" containedin=htmlTag,htmlTagN
syn match vueTransitionComponent contained "\<transition\>" containedin=htmlTag,htmlTagN nextgroup=vueTransitionName,vueTransitionMode
syn region vueTransitionName contained start=+\sname="+hs=s+7 end=+"+he=e-1 containedin=htmlTag,htmlTagN
syn region vueTransitionMode contained start=+\smode="+hs=s+7 end=+"+he=e-1 containedin=htmlTag,htmlTagN
syn match vueDynamicComponent contained "\<component\>\|\<keep-alive\>\|\<router-link\>" containedin=htmlTag,vueTag,htmlTagN
syn match vueTransitionComponent contained "\<transition\>" containedin=htmlTag,vueTag,htmlTagN nextgroup=vueTransitionName,vueTransitionMode
syn region vueTransitionName contained start=+\sname="+hs=s+7 end=+"+he=e-1 containedin=htmlTag,vueTag,htmlTagN
syn region vueTransitionMode contained start=+\smode="+hs=s+7 end=+"+he=e-1 containedin=htmlTag,vueTag,htmlTagN
syn keyword vueTagSpecial contained template script style containedin=htmlTagN
syn keyword htmlArg contained scoped ts
@ -43,7 +47,7 @@ syn keyword htmlArg contained scoped ts
" syn region cssClassRegion contained start=+classes="+hs=s+9 end=+"+he=e-1 contains=htmlSpecialChar,cssClassAttr,cssAttrNoise,cssClassName containedin=htmlTag,htmlTagN keepend
" syn region cssClassRegion contained start=+classes='+hs=s+9 end=+'+he=e-1 contains=htmlSpecialChar,cssClassAttr,cssAttrNoise,cssClassName containedin=htmlTag,htmlTagN keepend
syn match cssClassesAttr contained "\<[-a-zA-z0-9]*class[-a-zA-z0-9]*=" contains=htmlSpecialChar,cssClassAttr,cssAttrNoise,cssClassName containedin=htmlTag,htmlTagN keepend nextgroup=vueClassesName
syn match cssClassesAttr contained "\<[-a-zA-z0-9]*class[-a-zA-z0-9]*=" contains=htmlSpecialChar,cssClassAttr,cssAttrNoise,cssClassName containedin=htmlTag,vueTag,htmlTagN keepend nextgroup=vueClassesName
syn region vueClassesName contained start=+"+hs=s+1 end=+"+he=e-1