I am looking for a way to highlight text on the line above a matched pattern. For example, my text may appear like this:
Some text ---------
What I want is to match on the underline dashes and then highlight the 'Some text' based on that. I can match the dashes and highlight them by matching any set of three dashes like this:
syn match dashes "\v^\-\-\-.*$"
But I am not sure how to also highlight the line above. Does anyone have any ideas on how to accomplish that?