Sunday, January 8, 2012

Re: help with conceal

On Jan 8, 9:44 am, Fernando Basso <fernandobasso...@gmail.com> wrote:
> I have a little syntax file, with lines like:
>
>     highlight sExamplesInText ctermfg=yellow guifg=yellow
>     syntax match sExamplesInText /«\zs[^»]\_.\{-}\ze»/
>
> I'd like to use « and » to delimit the text I want to be yellow, but
> also, to hide those delimiters.
>
> I tried:
>
>     syntax match Conceal /«\|»/ conceal
>
> but that seems not to be the right thing (I did set conceallevel=2).
>
> So, text inside « and » characters should be yellow (or any other
> color). But the delimiter should be hidden. What is the way to go?

You probably want the concealends keyword. :help :syn-concealends

But you might also want to look at the txtfmt plugin:
http://www.vim.org/scripts/script.php?script_id=2208

--
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

No comments: