This is an example of my file format basically it follows this layout:
<word> <wordWithNumbers> <wraped text>
Examples:
sadfa 23eafa asdfasdf asdfdsf sflsdkjf ;lkja flksad ks adfsdf
asdfasdf dfas fasd fadsfaslf;ajdf;lkadjfadjfasdf
ccsfe f32eee asdfasdf asdfdsf sflsdkjf ;lkja flksad ks adfsdf
asdfasdf dfas fasd fadsfaslf;ajdf;lkadjfadjfasdf
Here is my syntax file that aims to color each of the 3 parts differently
:sy case match
:sy region A start=/^/ end=/^[a-zA-Z]\+ [0-9a-zA-Z]\+ / contains=B,C
:sy match B /^[a-zA-Z]\+ / contained " seems to work fine.
:sy match C / [0-9a-zA-Z]\+ / contained " alternatively colors words in
" <wraped text>!
:hi B ctermfg=blue
:hi C ctermfg=green
Specifically, I'm amused why match C escapes its parent region A. This results in miscolouring <wordwithnumbers>
and <wraped text>
.
Any idea where is my error please?