On Wednesday, December 11, 2013 8:17:58 AM UTC-6, BPJ wrote:
> I'm trying to write my own syntax file for a language where there are a lot 
> of groups of the form
> 
> :syn match langSomeGrp /^\s*KeyWord.*/
> 
> The problem is that there are also end-of-line comments 
> 
> :syn match langComment /--.*/
> 
> which can either stand on a line of its own OR be contained in a group like 
> the above. How do I express that? Is it OK to have a contains=grpB in the 
> declaration of a match grpA without a containedin=grpA in the declaration of 
> match grpB?

Yes, this is OK. Actually even with a containedin declaration, the a syntax 
definition can still match at the top level. It is only when you add the 
keyword "contained" that a group cannot match at the top level, and MUST be 
contained inside another match.

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to