On 5/5/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
On 5/5/06, Suresh Govindachar <[EMAIL PROTECTED]> wrote:
> I would like to color a file as follows:
>
> Everything is "normal" except for lines whose
> foldlevel is different from the foldlevel of both
> the line above and the line below. For such lines,
> the color should be Color_N where N is
> (foldlevel/2)%7 (wherein Color_0 could be red,
> Color_1 could be blue etc.).
>
> I would appreciate any help toward creating a
> syntax file to achieve such coloring.
I'm not big expert on syntax coloring, but I think this would
require expression-based syntax coloring (which does not
exist now, but probably would be cool).
Alternatively, the "static" coloring would be possible. By
this I mean: if the file is readonly, it would be possible to generate
(and source) the specific syntax script specific for this
unique contents. (The coloring would become off when contents
changes).
I don't think better solution exist for now; let someone correct me.
What I wrote above applies to the most generic solution
(solution that would work for any possible folding rules).
But if you don't need it super-generic, and if you have
the specific folding specification in mind, then if you
tell us your folding rules, then it's different.
Then it might be much easier problem.
For the specific folding, it might be possible to create
the syntax coloring tuned for this specific folding setup.
(Unless it's some complex expr folding, I'm afraid).
Yakov