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

42038Re: :match and 'hlsearch'

Expand Messages
  • Nikolai Weibull
    Mar 1, 2006
    • 0 Attachment
      On 3/1/06, Bram Moolenaar <Bram@...> wrote:
      >
      > Yakov Lerner wrote:
      > > Why not allow N separate match'es, identified by user-supplied name ?
      > >
      > > For example, then 'match Column80 Error /\%80c.*/' would peacefully
      > > coexist with paren-match and with 'unnamed' match set manually by the
      > > user.
      > >
      > > I use match sometimes. I think there might be uses for named matches.
      >
      > That's getting very complicated. It would require additional commands
      > to list the matches defined, clear matches by name or all of them, etc.
      > Implementation isn't simple either.
      >
      > I tend to think that two or three matches will be sufficient. One for
      > the matchparen plugin, one for manual matching and one for another
      > plugin.

      I realize that it would be additional work, but I think it would be
      worth it. There are quite a few things the :match command could be
      used for that can't be done with syntax highlighting. I suppose
      Tony's database-record lister is one plugin that could use it. Then
      there's the column-X-type plugin that highlights too-long lines. I
      was considering it for doing interactive-applications in Vim, but then
      saw that it only supported one match at a time and forgot about it.

      If we're going to go for two or three, then N is probably just as easy
      to implement anyway, as a more general solution is generally (see)
      easier to do.

      nikolai

      P.S.
      Even further: it would be quite cool to be able to modify the
      syntax-tree, i.e., being able to do something like

      :call highlightline(5, Comment)

      and even more fine-grained control, i.e., per-character highlighting.
      But I guess that might be getting a bit too close to an operating
      system.
      D.S.
    • Show all 21 messages in this topic