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

41257Re: [vim] Removing a highlight group

Expand Messages
  • Yegappan Lakshmanan
    Jun 25, 2003
      --- "Charles E. Campbell" <cec@...> wrote:
      > On Tue, Jun 24, 2003 at 03:12:28PM -0700, Yegappan Lakshmanan wrote:
      > > How do I remove (not clear) a highlight group? I have defined a
      > > highlight group like this:
      > >
      > > :hi link xyz Search
      > >
      > > How do I remove the new xyz highlight group?
      >
      > On Wed, Jun 25, 2003 at 10:10:38AM -0700, Yegappan Lakshmanan wrote:
      > > No. The "highlight clear" command is not removing the highlighting
      > > group.
      >
      > The doc indicates that you should use
      >
      > :hi link xyz NONE
      >
      > for clearing links. Admittedly
      >
      > :hi xyz
      >
      > doesn't give you an error message, but there's no associated
      > highlighting, either.
      >

      I want to link the "xyz" group, if the link is not present:

      if !hlexists("xyz")
      hi link xyz Search
      endif

      As you can see, this logic will fail, if the "xyz" highlight
      group is only cleared (and not removed).

      - Yegappan


      __________________________________
      Do you Yahoo!?
      SBC Yahoo! DSL - Now only $29.95 per month!
      http://sbc.yahoo.com
    • Show all 11 messages in this topic