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

current highlight group

Expand Messages
  • Hari Krishna Dara
    I have asked this question long time back and had no luck, so I want to try again. Is there anyway to find out what is the highlight group of the character
    Message 1 of 5 , Feb 5, 2004
    • 0 Attachment
      I have asked this question long time back and had no luck, so I want to
      try again. Is there anyway to find out what is the highlight group of
      the character under the cursor? There are functions to do the same for
      finding the syntax group and thus the highlighting group associated with
      it, but if there is no syntax group assigned (like with :match or :diff
      related commands), I don't understand how to do the same. I appreciate
      any information you can give.

      Thanks a lot,
      Hari

      __________________________________
      Do you Yahoo!?
      Yahoo! Finance: Get your refund fast by filing online.
      http://taxes.yahoo.com/filing.html
    • Gary Holloway
      Take a look at vimscript #383 http://www.vim.org/scripts/script.php?script_id=383 -gary
      Message 2 of 5 , Feb 10, 2004
      • 0 Attachment
        Take a look at vimscript #383

        http://www.vim.org/scripts/script.php?script_id=383

        -gary

        Hari Krishna Dara wrote:

        >I have asked this question long time back and had no luck, so I want to
        >try again. Is there anyway to find out what is the highlight group of
        >the character under the cursor? There are functions to do the same for
        >finding the syntax group and thus the highlighting group associated with
        >it, but if there is no syntax group assigned (like with :match or :diff
        >related commands), I don't understand how to do the same. I appreciate
        >any information you can give.
        >
        >Thanks a lot,
        >Hari
        >
        >__________________________________
        >Do you Yahoo!?
        >Yahoo! Finance: Get your refund fast by filing online.
        >http://taxes.yahoo.com/filing.html
        >
        >
      • Charles E. Campbell, Jr.
        ... I don t think the script quite addresses the problem (I was going to suggest hlt, available at http://www.erols.com/astronaut/index.html#VimFuncs as
        Message 3 of 5 , Feb 10, 2004
        • 0 Attachment
          Gary Holloway wrote:

          > Take a look at vimscript #383
          >
          > http://www.vim.org/scripts/script.php?script_id=383

          I don't think the script quite addresses the problem (I was going
          to suggest \hlt, available at
          http://www.erols.com/astronaut/index.html#VimFuncs
          as "HighLinkTrace"). Consider, if you will, the following file: <abc.xyz>

          one two three
          four five six
          seven eight nine
          :set hlt
          /eight

          Then eight will be highlighted and the cursor is upon it, but neither
          SyntaxAttr ("no syntax group here") nor \hlt will pick up on it.

          Regards,
          Chip Campbell
        • Hari Krishna Dara
          ... Exactly. There are many ways you can enable highlighting without using syntax rules, but I don t see any commands or functions to get this information
          Message 4 of 5 , Feb 10, 2004
          • 0 Attachment
            On Tue, 10 Feb 2004 at 3:41pm, Charles E. Campbell, Jr. wrote:

            > Gary Holloway wrote:
            >
            > > Take a look at vimscript #383
            > >
            > > http://www.vim.org/scripts/script.php?script_id=383
            >
            > I don't think the script quite addresses the problem (I was going
            > to suggest \hlt, available at
            > http://www.erols.com/astronaut/index.html#VimFuncs
            > as "HighLinkTrace"). Consider, if you will, the following file: <abc.xyz>
            >
            > one two three
            > four five six
            > seven eight nine
            > :set hlt
            > /eight
            >
            > Then eight will be highlighted and the cursor is upon it, but neither
            > SyntaxAttr ("no syntax group here") nor \hlt will pick up on it.
            >
            > Regards,
            > Chip Campbell
            >

            Exactly. There are many ways you can enable highlighting without using
            syntax rules, but I don't see any commands or functions to get this
            information back.

            Hari

            __________________________________
            Do you Yahoo!?
            Yahoo! Finance: Get your refund fast by filing online.
            http://taxes.yahoo.com/filing.html
          • Gary Holloway
            Sorry, I indeed didn t read the OP closely enough! -gary
            Message 5 of 5 , Feb 10, 2004
            • 0 Attachment
              Sorry, I indeed didn't read the OP closely enough!

              -gary

              Charles E. Campbell, Jr. wrote:

              > Gary Holloway wrote:
              >
              >> Take a look at vimscript #383
              >>
              >> http://www.vim.org/scripts/script.php?script_id=383
              >
              >
              > I don't think the script quite addresses the problem (I was going
              > to suggest \hlt, available at
              > http://www.erols.com/astronaut/index.html#VimFuncs
              > as "HighLinkTrace"). Consider, if you will, the following file: <abc.xyz>
              >
              > one two three
              > four five six
              > seven eight nine
              > :set hlt
              > /eight
              >
              > Then eight will be highlighted and the cursor is upon it, but neither
              > SyntaxAttr ("no syntax group here") nor \hlt will pick up on it.
              >
              > Regards,
              > Chip Campbell
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.