On Mon, Aug 22, 2011 at 19:46, Ben Fritz <[email protected]> wrote:
> > > On Aug 21, 9:54 am, Christophe Eymard > <[email protected]> wrote: > > Hello vim users, > > > > I am writing a syntax file for coco (coffeescript-like language for > > javascript), and have had issues with contains/containedin that are not > > respected. > > > > E.g. : > > syntax region javaScriptDocComment start="/\*\*\s*$" end="\*/" > > > contains=javaScriptDocTags,javaScriptCommentTodo,javaScriptCvsTag,@javaScriptHtml,@Spell > > fold > > syntax match javaScriptDocTags contained > > > "@\(param\|argument\|requires\|exception\|throws\|type\|class\|extends\|see\|link\|member\|module\|method\|title\|namespace\|optional\|default\|base\|file\)\>" > > nextgroup=javaScriptDocParam,javaScriptDocSeeTag skipwhite > > syntax match javaScriptDocTags contained > > > "@\(beta\|deprecated\|description\|fileoverview\|author\|license\|version\|returns\=\|constructor\|private\|protected\|final\|ignore\|addon\|exec\)\>" > > syntax match javaScriptDocParam contained "\%(#\|\w\|\.\|:\|\/\)\+" > > syntax region javaScriptDocSeeTag contained > > matchgroup=javaScriptDocSeeTag start="{" end="}" > contains=javaScriptDocTags > > > > But for exemple @title in the code still gets highlighted like if it were > in > > a Javascript doctag. > > > > What am I doing wrong ? > > > > It looks to me like @title is intentionally highlighted. What are you > trying to do? Why don't you expect it to be highlighted? It is intentionally highlighted, but it's "contained", and I only expect it to be highlighted in a javaScriptDocComment (see its "contains" clause). Reading the documentation of Vim, having an item with "contained" means that it can't be highlighted in the TopLevel. Yet for instance, @title is highlighted even when not in the javaScriptDocComment. -- 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
