In a vim syntax file I want to
- name one match
foofollowed bybar - and another
barthat followsfoo
And have them both work.
Here is what I have so far
syn match myFoo /foo\zebar/ display
syn match myBar /foo\zsbar/ display
When I do that it only matches the latter one.
I cant get both foo and bar to match.
Try this:
I’ve confirmed that it works. I have Vim coloring foobar where the foo is one color and bar is a different color. And this only happens if they are together as foobar; otherwise they are not colorized. I assigned them to different categories like this:
You probably have this covered already.