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

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

Expand Messages
  • Nate Soares
    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
    Message 1 of 14 , Dec 6, 2012
    • 0 Attachment
      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
    • So8res
      synID now returns a list. synIDattr now takes a list. They both still handle the single-id case, but the code s a bit messy and the name is stale. I think we
      Message 2 of 14 , Dec 6, 2012
      • 0 Attachment
        synID now returns a list.
        synIDattr now takes a list.

        They both still handle the single-id case, but the code's a bit messy and the name is stale. I think we should add synActive and synActiveAttr, which take/return lists instead of single numbers, and then deprecate synID*.

        --
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.