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

RE: Color Active Line

Expand Messages
  • vipin aravind
    That s agreeable. Register / holds the search pattern. ... But the search pattern will get active when you do * or / Its
    Message 1 of 7 , Jun 2, 2002
      That's agreeable.
      Register / holds the search pattern.

      :h \%
      But the search pattern will get active when
      you do * or /<enter>

      Its quite true that n fails because there
      Won't be 2 lines with same line numbers in a
      File.

      vipin


      -----Original Message-----
      From: R. Shankar [mailto:shankarpdy@...]
      Sent: Monday, June 03, 2002 11:35 AM
      To: vim@...
      Subject: Re:Color Active Line

      I did as Steve said.
      :au! CursorHold * let @/ = '\%' . line('.') . 'l.*'
      :set ut=100


      As soon as set this commenad , I do not get the ActiveLine highlighted.
      Any simple cursor movement also doesnot make the ActiveLine highlighted.

      Once I press the * , Active line got highlighted, but when press *, I
      wanted
      to search something. When I press n to do the next search , vim displays
      a message-
      E385: search hit BOTTOM without match for: \%28l.*

      I am not able to understand why ColorActiveLine clashes with Search
      Highlight.

      Regards
      shankar



      __________________________________________________
      Do You Yahoo!?
      Yahoo! - Official partner of 2002 FIFA World Cup
      http://fifaworldcup.yahoo.com
    • R. Shankar
      HI, if this is the case, then I cannot , have a ColorActiveLine and search . OK. Then mostly while coding, one has has to toggle between ColorActiveLine mode
      Message 2 of 7 , Jun 3, 2002
        HI, if this is the case, then I cannot , have a ColorActiveLine and search .
        OK.

        Then mostly while coding, one has has to toggle between ColorActiveLine mode
        and seach mode.

        Is there any way to switch ColorActiveLine mode off and make it on after some time, after I
        finish searching.

        By the way - I could not get the help for /%.
        How to get that.
        Regards
        shankar




        --- vipin aravind <vipin.aravind@...> wrote:
        > That's agreeable.
        > Register / holds the search pattern.
        >
        > :h \%
        > But the search pattern will get active when
        > you do * or /<enter>
        >
        > Its quite true that n fails because there
        > Won't be 2 lines with same line numbers in a
        > File.
        >
        > vipin
        >
        >
        > -----Original Message-----
        > From: R. Shankar [mailto:shankarpdy@...]
        > Sent: Monday, June 03, 2002 11:35 AM
        > To: vim@...
        > Subject: Re:Color Active Line
        >
        > I did as Steve said.
        > :au! CursorHold * let @/ = '\%' . line('.') . 'l.*'
        > :set ut=100
        >
        >
        > As soon as set this commenad , I do not get the ActiveLine highlighted.
        > Any simple cursor movement also doesnot make the ActiveLine highlighted.
        >
        > Once I press the * , Active line got highlighted, but when press *, I
        > wanted
        > to search something. When I press n to do the next search , vim displays
        > a message-
        > E385: search hit BOTTOM without match for: \%28l.*
        >
        > I am not able to understand why ColorActiveLine clashes with Search
        > Highlight.
        >
        > Regards
        > shankar
        >
        >
        >
        > __________________________________________________
        > Do You Yahoo!?
        > Yahoo! - Official partner of 2002 FIFA World Cup
        > http://fifaworldcup.yahoo.com
        >
        > > **************************Disclaimer**************************************************
        >
        > Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged'
        > and 'confidential' and intended for use only by the individual or entity to which it is
        > addressed. You are notified that any use, copying or dissemination of the information
        > contained in the E-MAIL in any manner whatsoever is strictly prohibited.
        >
        > ****************************************************************************************
        >


        __________________________________________________
        Do You Yahoo!?
        Yahoo! - Official partner of 2002 FIFA World Cup
        http://fifaworldcup.yahoo.com
      • vipin aravind
        You need to do :h % and not :h /% ... From: R. Shankar [mailto:shankarpdy@yahoo.com] Sent: Monday, June 03, 2002 2:18 PM To:
        Message 3 of 7 , Jun 3, 2002
          You need to do :h \% and not :h /%

          -----Original Message-----
          From: R. Shankar [mailto:shankarpdy@...]
          Sent: Monday, June 03, 2002 2:18 PM
          To: vipin.aravind@...
          Cc: vim@...
          Subject: RE: Color Active Line

          HI, if this is the case, then I cannot , have a ColorActiveLine and
          search .
          OK.

          Then mostly while coding, one has has to toggle between ColorActiveLine
          mode
          and seach mode.

          Is there any way to switch ColorActiveLine mode off and make it on after
          some time, after I
          finish searching.

          By the way - I could not get the help for /%.
          How to get that.
          Regards
          shankar




          --- vipin aravind <vipin.aravind@...> wrote:
          > That's agreeable.
          > Register / holds the search pattern.
          >
          > :h \%
          > But the search pattern will get active when
          > you do * or /<enter>
          >
          > Its quite true that n fails because there
          > Won't be 2 lines with same line numbers in a
          > File.
          >
          > vipin
          >
          >
          > -----Original Message-----
          > From: R. Shankar [mailto:shankarpdy@...]
          > Sent: Monday, June 03, 2002 11:35 AM
          > To: vim@...
          > Subject: Re:Color Active Line
          >
          > I did as Steve said.
          > :au! CursorHold * let @/ = '\%' . line('.') . 'l.*'
          > :set ut=100
          >
          >
          > As soon as set this commenad , I do not get the ActiveLine
          highlighted.
          > Any simple cursor movement also doesnot make the ActiveLine
          highlighted.
          >
          > Once I press the * , Active line got highlighted, but when press *, I
          > wanted
          > to search something. When I press n to do the next search , vim
          displays
          > a message-
          > E385: search hit BOTTOM without match for: \%28l.*
          >
          > I am not able to understand why ColorActiveLine clashes with Search
          > Highlight.
          >
          > Regards
          > shankar
          >
          >
          >
          > __________________________________________________
          > Do You Yahoo!?
          > Yahoo! - Official partner of 2002 FIFA World Cup
          > http://fifaworldcup.yahoo.com
          >
          > >
          **************************Disclaimer************************************
          **************
          >
          > Information contained in this E-MAIL being proprietary to Wipro
          Limited is 'privileged'
          > and 'confidential' and intended for use only by the individual or
          entity to which it is
          > addressed. You are notified that any use, copying or dissemination of
          the information
          > contained in the E-MAIL in any manner whatsoever is strictly
          prohibited.
          >
          >
          ************************************************************************
          ****************
          >


          __________________________________________________
          Do You Yahoo!?
          Yahoo! - Official partner of 2002 FIFA World Cup
          http://fifaworldcup.yahoo.com
        • Jürgen Krämer
          Hi, ... you might try ... Because it uses match to highlight a string, it does not interfere with the current search pattern. Regards, Jürgen -- Jürgen
          Message 4 of 7 , Jun 3, 2002
            Hi,

            "R. Shankar" wrote:
            >
            > HI, if this is the case, then I cannot , have a ColorActiveLine and
            > search .

            you might try

            :highlight CurrentLine guibg=darkgrey guifg=white
            :au! CursorHold * exe 'match CurrentLine /\%' . line('.') . 'l.*/'
            :set ut=100

            Because it uses 'match' to highlight a string, it does not interfere
            with the current search pattern.

            Regards,
            Jürgen

            --
            Jürgen Krämer Softwareentwicklung/-support
            Habel GmbH mailto:software@...
            Hinteres Öschle 2 Tel: (0 74 61) 93 53 15
            78604 Rietheim-Weilheim Fax: (0 74 61) 93 53 99
          • Bernard
            ... How would one go about turning the highlighting off if I didn t want it for some reason? Cheers, Bernard
            Message 5 of 7 , Jun 3, 2002
              On Mon, 3 Jun 2002, [iso-8859-1] Jürgen Krämer wrote:

              >
              > Hi,
              >
              > "R. Shankar" wrote:
              > >
              > > HI, if this is the case, then I cannot , have a ColorActiveLine and
              > > search .
              >
              > you might try
              >
              > :highlight CurrentLine guibg=darkgrey guifg=white
              > :au! CursorHold * exe 'match CurrentLine /\%' . line('.') . 'l.*/'
              > :set ut=100
              >
              > Because it uses 'match' to highlight a string, it does not interfere
              > with the current search pattern.

              How would one go about turning the highlighting off if I didn't want it
              for some reason?


              Cheers,
              Bernard
            • Jürgen Krämer
              Hi, ... (The order of these command is important. If :match none were executed first, the autocommand would almost immediately execute another match command.)
              Message 6 of 7 , Jun 3, 2002
                Hi,

                Bernard wrote:
                >
                > On Mon, 3 Jun 2002, [iso-8859-1] Jürgen Krämer wrote:
                >
                > > :highlight CurrentLine guibg=darkgrey guifg=white
                > > :au! CursorHold * exe 'match CurrentLine /\%' . line('.') . 'l.*/'
                > > :set ut=100
                >
                > How would one go about turning the highlighting off if I didn't want
                > it for some reason?

                :au! CursorHold
                :match none

                (The order of these command is important. If :match none were executed
                first, the autocommand would almost immediately execute another match
                command.)

                Regards,
                Jürgen

                --
                Jürgen Krämer Softwareentwicklung/-support
                Habel GmbH mailto:software@...
                Hinteres Öschle 2 Tel: (0 74 61) 93 53 15
                78604 Rietheim-Weilheim Fax: (0 74 61) 93 53 99
              Your message has been successfully submitted and would be delivered to recipients shortly.