admin管理员组

文章数量:1391934

I'm working on a Vim syntax file for a format that allows both single- or multi-line macro definitions. That is, they may look like

MACRO NAME definition...

or

MACRO NAME {
  line1
  line2
  ...
}

I'm trying to define a syntax region but I cannot figure out how to specify an end= that works for both cases. How can I specify that the region should end at either

  • the closing } if the first line ends with {,
  • the first newline otherwise?

Is that even possible?

本文标签: How do I define a vim syntax region with more that one possible endStack Overflow