Friday, March 2, 2012

Re: creating syntax file - syn match problem

On Fri, 2 Mar 2012 09:24:28 -0800 (PST)
Ben Fritz <fritzophrenic@gmail.com> wrote:

>> b) multi-line blocks
>>  - are delimited by any number of braces (min 3)
>
>For this, I think you'll need to compromise and select some maximum
>number of braces to allow highlighting for.

I can happily settle for 4.

>>  - the code may contain sets of curly braces (they don't need to
>> match)
>
>I'm not sure what you mean by this. Are you saying {{{ does not always
>start a code block?

correct. {{{ does not start a code block if it is inside a code block.
Curly braces inside a code block are just text.

>>  - the block is closed by the first set of braces that contains the
>> same number of braces as the opening set
>
>This makes sense. But can blocks with the same number of braces nest?
>Can groups overlap, e.g. is this valid?
>
>begin block1 {{{
>code
>begin block2 {{{{
>end block1 }}}
>end block2 }}}}

There is no overlapping. Here, the first set of braces {{{ starts a
code block, which is terminated by }}}. The text enclosed between those
two sets of braces is "code". "end block2 }}}}" has no meaning and
should remain uncoloured.

Therefore, I would like {{{ and }}} to be highlighted blue and the text
inbetween green.


--
Tarlika

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