Folks,

I am trying to embed perl syntax, but it seems that somehow my new cluster 
contains definitions from the perl.vim that were already contained.  I think 
that doesn't make sense, or at least, when I figured out to remove them from 
the cluster, things started working:

  syntax include @perlOnly syntax/perl.vim
  let b:current_syntax = "calibre"
  syntax cluster perlOnly 
remove=perlAnglesDQ,perlAnglesSQ,perlArrow,perlBracesDQ,perlBracesSQ,perlBracketsDQ,perlBracketsSQ,perlElseIfError,perlFiledescStatement,perlFiledescStatementComma,perlFiledescStatementNocomma,perlFormatField,perlFormatName,perlFunctionName,perlFunctionPRef,perlGenericBlock,perlMethod,perlNotEmptyLine,perlPackageRef,perlParensDQ,perlParensSQ,perlSpecialMatch,perlSpecialString,perlSpecialStringU,perlSpecialStringU2,perlStatementPackage,perlSubAttributes,perlSubAttributesCont,perlSubError,perlSubName,perlSubPrototype,perlSubPrototypeError,perlSubstitutionGQQ,perlSubstitutionSQ,perlTodo,perlTranslationGQ,perlVStringV,perlVarMember,perlVarSimpleMember,perlVarSimpleMemberName
  syntax region calibrePerl matchgroup=Structure start=/\[\[/ end=/\]\]/ 
contains=@perlOnly

The list of removed sections is created simply from

 grep "\<contained\>" perl.vim | while read line; do echo perl${line#*perl}}; 
done | cut -f 1 -d\  | sort -u | tr "\\n" ","

The documentation states:

          All syntax items declared in the included file will have the
          "contained" flag added.  In addition, if a group list is specified,
          all top-level syntax items in the included file will be added to
          that list. >

So, if I'm reading that correctly (and I'm very new at this, I could be 
entirely in the wrong tree), it does seem to imply that syntax elements that 
already have "contained" in the syntax included file should NOT be placed in to 
the new list name.  This makes sense, I think, because they expect to be 
included ONLY in regions/clusters/etc that are defined internally in the 
perl.vim file.  I suspect this revolves around this in the perl.vim:

syn cluster perlTop             contains=TOP

... but I don't know how to really explore what's going on.


Any advice here would be appreciated!

-- Mario

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

Reply via email to