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

Re: [patch] Extend :highlight link command to take attributes

Expand Messages
  • So8res
    ... I believe you re correct, though I haven t updated highlight_has_attr / highlight_color to correctly get the color (I only updated syn_id2attr and
    Message 1 of 4 , Dec 4, 2012
    • 0 Attachment
      > This seems another useful feature, and since you still only have a single item defining highlighting for a given highlighted item in the text, this change shouldn't need any additions to the behavior synIDattr or synIDtrans.

      I believe you're correct, though I haven't updated highlight_has_attr / highlight_color to correctly get the color (I only updated syn_id2attr and syn_id2color). I'll update the patch shortly.

      > Unlike this, the :syntax combine change allows (if I understand correctly) potentially any number of items in the syntax stack to define highlighting for a single highlighted item in the text.

      Correct. They're both really useful in their own right. This is useful for simplifying your color schemes, whereas syntax-combine is useful for nested syntaxes.

      I've got a third patch baking that will add the ability to turn terminal attributes off which will work both here and in syntax-combine.

      --
      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
      Upon reconsideration, synIDtrans should return a list of IDs that are being used in the current highlight group. This includes all links that also have
      Message 2 of 4 , Dec 4, 2012
      • 0 Attachment
        Upon reconsideration, synIDtrans should return a list of IDs that are being used in the current highlight group. This includes all links that also have attributes & the top level group if any, skipping vanilla links.

        This is consistent with the behavior that syntax-combine should exhibit.

        Here's the patch updated with the synIDtrans fix.

        We might want to consider adding a "link" {what} to synIDattr, as it's now a bit harder to detect links.

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