Thursday, November 26, 2009

Re: creating syntax files

On Nov 25, 1:35 pm, Nathaniel Echols <nathaniel.ech...@gmail.com>
wrote:
>
>   syn match confAttribute "^[\ *]\.[a-z][a-z0-9_]*[\ ]*="
>
> which also works.  But what I eventually want is to highlight the attribute,
> and then have everything on the other side of the '=' be treated as a
> string, whether or not it is enclosed in quotes.  Nothing I've tried has
> worked; if I try to define a string as a region starting with the pattern
> above, the attribute loses its highlighting.  The catch is that these
> attribute names and '=' are not reserved, and can be used anywhere in a
> string - it's the ordering of these elements that is important.
>  ('contained' helped with some problems, but didn't entirely do what I
> needed.)
>

I think you want "contained" combined with "nextgroup". See :help syn-
nextgroup for details.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: