On Mi, 05 Nov 2014, Bram Moolenaar wrote:
> > this problem is not mentioned in the latest todo list. Is that no issue
> > for your?
>
> As I already mentioned: It might break some things.
>
> The flag does apply to "nextgroup", as documented. That's why it checks
> current_next_flags.
>
> Also, the rules become too complex, making a difference for a group that
> has a "containedin" argument changes how the white space before it
> matches. That's not what someone expects.
How about the current patch. This doesn't touch syntax highlighting.
This is an enhanced version of the old matchadd_conceal patch from
https://groups.google.com/d/msg/vim_dev/8bKa98GhHdk/VOzIBhd1m8YJ
The difference is, by default matchadd('Conceal', '/pattern/') works as
is, but you can add a special dictionary that allows to specify a custom
cchar value for that particular concealed match.
So use matchadd('Conceal', ' ', 10, -1, {'conceal' "\u2d1"})
to have spaces highlighted with 'ˑ'
This has the advantage of being backwards compatible, while still
allowing to fine tune each separate Conceal match and also allows for
future extensions, so one could theoretically add other values to the
dictionary.
If we could agree to merge this version, we also do not need the
space_listchars patch
(
https://groups.google.com/d/msg/vim_dev/dIQHjW1g92s/CtBo6MfNXN4J) as it
could be achieved by using matching functions.
The patch includes a new test to make sure matchadd and matchpos do work
as expected, it also tests the getmatches() and setmatches() function as
well as working correctly together with syntax highlightinG. I have
tried to test all different things I could imagine.
Best,
Christian
--
Gern lesen heißt, die einem im Leben zugeteilten Stunden der
Langeweile gegen solche des Entzückens einzutauschen.
-- Charles-Louis de Montesquieu