Loading ...
Sorry, an error occurred while loading the content.

67466Re: [patch] Add a 'modifier' keyword to the :syntax commands, allowing syntax matches to stack.

Expand Messages
  • Nate Soares
    Dec 6, 2012
      Oh, right, of course we can't have a {flatten} arg in synIDattr without knowing the row/column.

      It seems like the right thing to do here is have synID return a list of IDs being used, and have synIDattr take a list of IDs and flatten them when looking up an attribute. This has the nice property that existing code keeps working, and that flattening is the default. You can still pull any id from the list and call synIDattr on it alone if you want the "non-flattened" attribute.

      The complexity comes when you try to integrate this behavior with the extended link behavior: what happens when you are using both extended links and combining syntax? My inclination is that synID creates a flat list of *all* highlight groups being used. The user can use the synIDattr(..., "combine") on each element to tell if it comes from an extended link or a syn-combine if they really need to, but in the average case they'll probably just pass the list on to synIDattr.

      You received this message from the "vim_dev" 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
    • Show all 14 messages in this topic