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

arbitrary block of lines highlighting

Expand Messages
  • Dr. Charles E. Campbell
    Hello! Many times a way to highlight the current line has been requested. Here s another related request having to do with [h]diffwin.vim: * Is there a way
    Message 1 of 5 , Mar 30, 2001
    • 0 Attachment
      Hello!

      Many times a way to highlight the current line has
      been requested. Here's another related request
      having to do with [h]diffwin.vim:

      * "Is there a way to highlight the differences as
      emacs does with some color?"

      This would entail [h]diffwin.vim deciphering
      diff blocks and highlighting the source code
      windows affected lines -- a request which
      could be satisfied by...

      :[range]cbg -- change background highlighting only

      Just food for thought for The Future, not necessarily
      something to go into 6.0.

      Regards,
      C Campbell

      --
      Charles E Campbell, Jr, PhD _ __ __
      Goddard Space Flight Center / /_/\_\_/ /
      cec@... /_/ \/_//_/
      PGP public key: http://www.erols.com/astronaut/pgp.html
    • Neil Bird
      ... This would possibly need to be extended to be usable [some form of internal bookmarks?], but a (simple?) addition to the syntax command family of
      Message 2 of 5 , Mar 30, 2001
      • 0 Attachment
        "Dr. Charles E. Campbell" wrote:
        > Many times a way to highlight the current line has
        > been requested. Here's another related request
        > having to do with [h]diffwin.vim:

        This would possibly need to be extended to be usable [some form of
        internal bookmarks?], but a (simple?) addition to the syntax command
        family of linenumber might just to the trick here;

        syntax linenumber PreProc 14
        syntax linenumber Todo 20-24,142

        .. sort of thing.

        No reason why that couldn't be 'location line' & 'location column' ...


        It all goes a bit pair shaped when the file's edited, though!

        --
        =====================- http://www.thalesgroup.com/ -=====================
        Neil Bird Principal Engineer |
        work - mailto:neil.bird@... | $> cd /pub
        personal - mailto:neil@... | $> more beer
      • Moore, Paul
        From: Dr. Charles E. Campbell [mailto:cec@gryphon.gsfc.nasa.gov] ... will highlight lines 11-19. The only trouble is that these don t accumulate, so you d have
        Message 3 of 5 , Mar 30, 2001
        • 0 Attachment
          From: Dr. Charles E. Campbell [mailto:cec@...]
          > * "Is there a way to highlight the differences as
          > emacs does with some color?"
          >
          > This would entail [h]diffwin.vim deciphering
          > diff blocks and highlighting the source code
          > windows affected lines -- a request which
          > could be satisfied by...
          >
          > :[range]cbg -- change background highlighting only
          >
          > Just food for thought for The Future, not necessarily
          > something to go into 6.0.

          :hi note guibg=red
          :match note /\%>10l\%<20l.*/

          will highlight lines 11-19. The only trouble is that these don't accumulate,
          so you'd have to manipulate a single match pattern.

          :hi note /\(\%10l\|\%20l\).*/

          will highlight only lines 10 and 20.

          Hey, this is powerful! (Messy, but powerful...)

          Paul.
        • Dr. Charles E. Campbell
          Hello! You must read the manual much better than I; when did match show up? It looks like I could do the highlighting already; when I get a chance, I ll
          Message 4 of 5 , Mar 30, 2001
          • 0 Attachment
            Hello!

            You must read the manual much better than I; when did "match" show
            up? It looks like I could do the highlighting already; when I
            get a chance, I'll start looking into modifying <hdiffwin.vim>.

            Thank you,
            Chip Campbell

            ---------------------------------------------------------------------
            Thus saith Moore, Paul:
            > :hi note guibg=red
            > :match note /\%>10l\%<20l.*/
            >
            > will highlight lines 11-19. The only trouble is that these don't accumulate,
            > so you'd have to manipulate a single match pattern.
            >
            > :hi note /\(\%10l\|\%20l\).*/
            >
            > will highlight only lines 10 and 20.
            >
            > Hey, this is powerful! (Messy, but powerful...)


            --
            Charles E Campbell, Jr, PhD _ __ __
            Goddard Space Flight Center / /_/\_\_/ /
            cec@... /_/ \/_//_/
            PGP public key: http://www.erols.com/astronaut/pgp.html
          • Neil Bird
            ... Cool, yes - I d forgotten about the new line-matching regexp. What about a function to create/delete line-based matches with a name LineXXX [XXX from the
            Message 5 of 5 , Apr 2, 2001
            • 0 Attachment
              "Moore, Paul" wrote:
              > :hi note guibg=red
              > :match note /\%>10l\%<20l.*/

              Cool, yes - I'd forgotten about the new line-matching regexp.

              What about a function to create/delete line-based matches with a name
              LineXXX [XXX from the line number, thus one per highlit line] and that
              LineXXX aliased to LineMarker.

              Of course, much easier when wishing to highlight the current line (the
              match changed using events?).

              Anyone want to post the code to do this-line highlighting (same me some
              time :-) )?

              --
              =====================- http://www.thalesgroup.com/ -=====================
              Neil Bird Principal Engineer |
              work - mailto:neil.bird@... | $> cd /pub
              personal - mailto:neil@... | $> more beer
            Your message has been successfully submitted and would be delivered to recipients shortly.