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

RE: give c defines a color

Expand Messages
  • John Beckett
    ... If highlighting often, the following is magic: http://vim.wikia.com/wiki/Highlight_multiple_words John
    Message 1 of 4 , Jun 29, 2009
    • 0 Attachment
      Jeri Raye wrote:
      > is it then possible to give PI MAX and MIN anywhere used in
      > the file to give it the color brown?

      Highlight using 'Keyword':
      :match Keyword /\<PI\>\|\<MAX\>\|\<MIN\>/

      Show definition of 'Keyword':
      :hi Keyword

      Clear highlight:
      :match

      If highlighting often, the following is magic:
      http://vim.wikia.com/wiki/Highlight_multiple_words

      John


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • A. S. Budden
      ... Note that, if there are a LOT of keywords, this will eventually start to slow Vim down (due to the regular expression complexity or number of regular
      Message 2 of 4 , Jun 30, 2009
      • 0 Attachment
        2009/6/29 John Beckett <johnb.beckett@...>:
        >
        > Jeri Raye wrote:
        >> is it then possible to give PI MAX and MIN anywhere used in
        >> the file to give it the color brown?
        >
        > Highlight using 'Keyword':
        >    :match Keyword /\<PI\>\|\<MAX\>\|\<MIN\>/

        Note that, if there are a LOT of keywords, this will eventually start
        to slow Vim down (due to the regular expression complexity or number
        of regular expressions). A faster match can be achieved with:

        syn keyword Keyword PI MAX MIN

        Al

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.