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

Re: [patch] Allow 'highlight' command to add to existing terminal attributes.

Expand Messages
  • So8res
    Unfortunately, this doesn t address my StackOverflow question entirely, nor does it make it possible to avoid the workaround mentioned. This patch allows you
    Message 1 of 5 , Dec 2, 2012
    • 0 Attachment
      Unfortunately, this doesn't address my StackOverflow question entirely, nor does it make it possible to avoid the workaround mentioned.

      This patch allows you to update a single highlight group, but it does not allow you to create a modifier highlight group. In other words, if you have

      highlight Italic cterm=italic
      highlight Bold cterm+=bold

      then even if you match 'Bold' inside 'Italic' you only get the 'Bold' highlighting, not a combination of the two.

      I'd like to add a new highlight type of the form

      highlight modifier Bold cterm=bold

      which (in this example) would continue highlighting with the previous matchgroup but *add* the bold terminal attribute.

      This feature is a bit more involved than the above patch -- Bram, would you accept such a feature? I don't want to waste my efforts.

      --
      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
      Correction -- it would have to be a new syntax type, not a new highlight type. You d have syntax modifier region bold start= * end= * highlight Bold
      Message 2 of 5 , Dec 2, 2012
      • 0 Attachment
        Correction -- it would have to be a new syntax type, not a new highlight type. You'd have

        syntax modifier region bold start='\*' end='\*'
        highlight Bold cterm=bold

        This would involve modifying text to have both a base highlight group and an arbitrary number of syntax modifiers active. Thoughts?

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