Christian Brabandt wrote:

> On So, 10 Apr 2011, Bram Moolenaar wrote:
> 
> > Can you explain what the effect is? 
> 
> Basically, I wanted to create a plugin that uses concealing for 
> something like vertical folding. I tried to dynamically conceal columns 
> using :call matchadd(), but this only highlights the region, it does not 
> conceal it, no matter what 'cole' is set to. So instead, I started using 
> :syn match commands. Problem here is, you can't really remove matches 
> and it is not that easy to use.
> 
> There is still a problem, that cursor movement won't skip over concealed 
> text. I am currently thinking about creating a patch for that as well, 
> e.g. when cole is set to 4 (it currently allows only 3). But I don't 
> know how easy that is to implement, it would have to be done on a lot of 
> places.
> 
> > Perhaps we also need an update to
> > the documentation. And an example to show the effect.
> 
> I Don't think so. I expect, that when cole is set to 3, that a :call 
> matchadd('Conceal', 'foobar') conceals the foobar part
> and not to have it highlighted. I would even consider this a bug.

No, using the "Conceal" group only means it's highlighted like
characters replaced by the conceal feature, not that they are not
displayed.

You will have to do more than setting the highlighting group, something
similar to the cchar and conceal arguments to :syn.

You will also have to fix the cursor movement and any other related
problems before I would include this.  Experience with the conceal
feature has learned us that it can easily trigger more problems, thus we
also need tests.

-- 
Bad fashion can discourage normal people from interacting with the engineer
and talking about the cute things their children do.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui