On Jun 11, 11:10 am, Andres P <aep...@gmail.com> wrote:
> On Wed, Jun 9, 2010 at 7:57 PM, Andres P <aep...@gmail.com> wrote:
> > Now, I want to do interleaved/blended regions, so that I can make this
> > work:
> >  ( yellow { BLUE ) red }
>
> Just in case anyone's looking for the same info; I got it working with
> \zs and \ze.
>
> I still have to create 'diffs' for every possible combination, but it
> looks like it's currently the only way of achieving blended regions.

Andres,
As you may have realized by now, the fully generic solution to this
sort of problem requires *many* regions. The Txtfmt plugin supports
freely intermixing format and fg/bg color tokens. For example, you
enter a yellow foreground token and subsequent text is yellow. You
then enter a bold-italic token, and subsequent text is yellow, bold-
italic. You then enter a blue background token, and subsequent text is
yellow, bold-italic on a blue background. You then enter an italic
token, and subsequent text is yellow, italic on a blue background. You
get the idea...

To support all possible permutations of 8 fg colors, 8 bg colors, and
bold/underline/italic requires well over 3000 regions. Txtfmt supports
a configuration (disabled by default for performance reasons), which
adds standout, reverse and undercurl attributes to the mix. Just
adding those 3 attributes increases the number of regions required to
over 28000! If you're curious as to how the "intermingling" of regions
is handled (without loss of orthogonality), you can check out the
Define_syntax function within syntax/txtfmt.vim.

Sincerely,
Brett Stahlman

>
> syn-transparent also helps out a lot ;)
>
> Andres P

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to