I am trying to adjust the reStructured text syntax highlighting in vim. I have tried several vim regexes to get highlight working for below two examples, but I am unable to. If I use search/highlight function all below regexes do the job, but for highlighter (syn match) it is not working. Maybe I need to change syn match to something else?
This is the text example I am looking at in rst file:
.. item:: This is the title I want to highlight
there is some text here which I do not care
.. item-matrix:: This is the title I want to highlight
:source: XX
:target: YY
Regexes that match the text:
[.+].*[:+] \zs.*
\(.. .*:: \)\zs.*
When putting that to syn match it does not work (.vim):
syn match rstHeading /[.+].*[:+] \zs.*/
I know I am close because above example matches for
..:: This is highlighted as rstHeading