Hello Aaron,
You could do something like this:
syn match Sel1 /^\.selector/ nextgroup=Items1 skipwhite
syn region Items1 start=/{/ end=/}/ contained keepend
\ nextgroup=Sel2 skipwhite skipempty
hi Sel1 guibg=#000044
hi Items1 guibg=#000044
syn match Sel2 /^\.selector/ contained nextgroup=Items2 skipwhite
syn region Items2 start=/{/ end=/}/ contained keepend
hi Sel2 guibg=#004400
hi Items2 guibg=#004400
That will get you started.
regards,
Peter
--- Aaron <[EMAIL PROTECTED]> wrote:
> I've been swapping my subscribed addresses, so I apologize if this got
> posted more than once.
>
> My question is casual, but I wasn't able to find anything on the FAQs or
> Google, so I hope someone here can tell me if I'm nuts or not.
>
> In my ideal world (which, so far, Vim has done an excellent job creating
> for me), CSS definitions would be lightly, alternatingly shaded. Here at
> work, we format our CSS files like so:
>
> .selector { property: value; property: value;
> property: value; }
> .selector { property: value; }
> .selector { property: value; property: value;
> property: value; property: value; }
>
>
> You can see immediately that it is easy enough to scan down the left
> column to find the selector you're interested in, but it's a bit more
> difficult to see where one definition's property list starts and
> another's ends (especially with syntax highlighting in there).
>
> Is there some way, perhaps through a syntax rule, or rules, to have Vim
> shade the background of *alternating* CSS definitions, assuming this
> file format?
>
> I'm handy with regex but I don't know if Vim's syntax system is even up
> to the task. A function that ran against the buffer would be fine, too.
>
> Thanks!
>
> --
> Aaron
>
____________________________________________________
On Yahoo!7
Photos: Unlimited free storage keep all your photos in one place!
http://au.photos.yahoo.com