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

recenter revisited

Expand Messages
  • Rick Owen
    Several days ago I asked about a macro that would redraw the screen with the line where te cursor was positioned becoming the top line on the screen. I think
    Message 1 of 7 , Sep 13, 2006
    • 0 Attachment
      Several days ago I asked about a macro that would redraw the screen with the line where te cursor was positioned becoming the top line on the screen.  I think it was Jon (I think) that suggested that I use recenter to accomplish what I wanted. 
       
      The command "recenter" is similar to what I want, but what I would really like is a macro that would be invoked like this:
       
      n topline
       
      Where the current line would would become the top on the screen.  If n is specified, the macro make the current line the nth line from the top of the display.
       
      For example
       
       
       
       
      aaaaaaaaaaaaaaaaaaaaaa <<< top of display
      bbbbbbbbbbbbbbbbbbbbbb
      cccccccccccccccccccccc
      dddddddddddddddddddddd
      eeeeeeeeeeeeeeeeeeeeee
      ffffffffffffffffffffff
      gggggggggggggggggggggg
      hhhhhhhhOhhhhhhhhhhhhh <<< "2 topline" invoked
              ^                  cursor position
       
      would yield
       
      gggggggggggggggggggggg <<< top of display
      hhhhhhhhOhhhhhhhhhhhhh
                      ^                                     cursor position
       
      This is very similar to recenter except that instead of the midde of the screen, it does it at the top, and it reposition the whole line as the nth line rather than just the cursor.  What would be really sweet would also be a companion macro that does the same thing except it uses the bottom of the display :).
       
      I hope this makes sense.
       
      Thanks,
      Rick.
    • Phillips, Steven
      Rick, n recenter does this, e.g. 2 recenter will do as your example below, so try rebinding C-l as follows: 1 global-bind-key recenter C-l Steve
      Message 2 of 7 , Sep 13, 2006
      • 0 Attachment
        Rick,
         
        n recenter does this, e.g. '2 recenter' will do as your example below, so try rebinding C-l as follows:
         
        1 global-bind-key recenter "C-l"
         
        Steve


        From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf Of Rick Owen
        Sent: 13 September 2006 13:42
        To: jasspa@yahoogroups.com
        Subject: [jasspa] recenter revisited

        Several days ago I asked about a macro that would redraw the screen with the line where te cursor was positioned becoming the top line on the screen.  I think it was Jon (I think) that suggested that I use recenter to accomplish what I wanted. 
         
        The command "recenter" is similar to what I want, but what I would really like is a macro that would be invoked like this:
         
        n topline
         
        Where the current line would would become the top on the screen.  If n is specified, the macro make the current line the nth line from the top of the display.
         
        For example
         
         
         
         
        aaaaaaaaaaaaaaaaaaaaaa <<< top of display
        bbbbbbbbbbbbbbbbbbbbbb
        cccccccccccccccccccccc
        dddddddddddddddddddddd
        eeeeeeeeeeeeeeeeeeeeee
        ffffffffffffffffffffff
        gggggggggggggggggggggg
        hhhhhhhhOhhhhhhhhhhhhh <<< "2 topline" invoked
                ^                  cursor position
         
        would yield
         
        gggggggggggggggggggggg <<< top of display
        hhhhhhhhOhhhhhhhhhhhhh
                        ^                                     cursor position
         
        This is very similar to recenter except that instead of the midde of the screen, it does it at the top, and it reposition the whole line as the nth line rather than just the cursor.  What would be really sweet would also be a companion macro that does the same thing except it uses the bottom of the display :).
         
        I hope this makes sense.
         
        Thanks,
        Rick.
      • Jon Green
        ... I think you mean 2 global-bind-key recenter C-l If you really do want something called topline then this will do the job: define-macro topline &cond @?
        Message 3 of 7 , Sep 13, 2006
        • 0 Attachment
          Phillips, Steven wrote:
          > Rick,
          >
          > n recenter does this, e.g. '2 recenter' will do as your example below,
          > so try rebinding C-l as follows:
          >
          > 1 global-bind-key recenter "C-l"
          >
          > Steve

          I think you mean

          2 global-bind-key recenter "C-l"

          If you really do want something called "topline" then this will do the job:

          define-macro topline
          &cond @? @# 0 recenter
          !emacro
        • Steven Phillips
          I did mean 1 not 2, this way you can do C-l for the top line, esc 2 C-l for the second line etc etc.
          Message 4 of 7 , Sep 13, 2006
          • 0 Attachment
            I did mean '1' not 2, this way you can do 'C-l' for the top line, 'esc 2 C-l'
            for the second line etc etc.

            > Subject: [jasspa] recenter revisited
            > From: Jon Green <jnaught@...>
            > Date: Wednesday, September 13, 2006, 5:32:20 PM
            > To: jasspa@yahoogroups.com
            > Phillips, Steven wrote:
            >> Rick,
            >>
            >> n recenter does this, e.g. '2 recenter' will do as your example below,
            >> so try rebinding C-l as follows:
            >>
            >> 1 global-bind-key recenter "C-l"
            >>
            >> Steve

            > I think you mean

            > 2 global-bind-key recenter "C-l"

            > If you really do want something called "topline" then this will do the job:

            > define-macro topline
            > &cond @? @# 0 recenter
            > !emacro





            > __________________________________________________________________________

            > This is an unmoderated list. JASSPA is not responsible for the content of
            > any material posted to this list.

            > To unsubscribe, send a mail message to

            > mailto:jasspa-unsubscribe@yahoogroups.com

            > or visit http://groups.yahoo.com/group/jasspa and
            > modify your account settings manually.


            >
            > Yahoo! Groups Links
          • Rick Owen
            Wonderful. Thank you. One last question and then I will go back into my cave for a day or two. I understand how to do rectangular (column) operations, which
            Message 5 of 7 , Sep 13, 2006
            • 0 Attachment
              Wonderful.  Thank you.  One last question and then I will go back into my cave for a day or two.  I understand how to do rectangular (column) operations, which I do frequently.  However, is it possible to have the highlighting understand rectangular blocks.  It would be nice to tell me32 to highlight in rectangular mode and have only the affected block be highlighted rather than having to imagine the rectangular block as being between point and mark.
               
              Thanks,
              Rick.

               



              ----- Original Message ----
              From: Steven Phillips <bill@...>
              To: Jon Green <jasspa@yahoogroups.com>
              Sent: Wednesday, September 13, 2006 11:27:58 AM
              Subject: Re[2]: [jasspa] recenter revisited

              I did mean '1' not 2, this way you can do 'C-l' for the top line, 'esc 2 C-l'
              for the second line etc etc.

              > Subject: [jasspa] recenter revisited
              > From: Jon Green <jnaught@samsung. com>
              > Date: Wednesday, September 13, 2006, 5:32:20 PM
              > To: jasspa@yahoogroups. com
              > Phillips, Steven wrote:
              >> Rick,
              >>
              >> n recenter does this, e.g. '2 recenter' will do as your example below,
              >> so try rebinding C-l as follows:
              >>
              >> 1 global-bind- key recenter "C-l"
              >>
              >> Steve

              > I think you mean

              > 2 global-bind- key recenter "C-l"

              > If you really do want something called "topline" then this will do the job:

              > define-macro topline
              > &cond @? @# 0
              recenter
              > !emacro

              > ____________ _________ _________ _________ _________ _________ _

              > This is an unmoderated list. JASSPA is not responsible for the content of
              > any material posted to this list.

              > To unsubscribe, send a mail message to

              > mailto:jasspa-unsubscribe@ yahoogroups. com

              > or visit http://groups. yahoo.com/ group/jasspa and
              > modify your account settings manually.

              >
              > Yahoo! Groups Links


            • Jon Green
              ... No it will not do this, at the moment the selection hilighting only effectively works between two points, there is no understanding of a rectangular
              Message 6 of 7 , Sep 13, 2006
              • 0 Attachment
                Rick Owen wrote:
                > Wonderful. Thank you. One last question and then I will go back into
                > my cave for a day or two. I understand how to do rectangular (column)
                > operations, which I do frequently. However, is it possible to have the
                > highlighting understand rectangular blocks. It would be nice to tell
                > me32 to highlight in rectangular mode and have only the affected block
                > be highlighted rather than having to imagine the rectangular block as
                > being between point and mark.
                >
                > Thanks,
                > Rick.
                >

                No it will not do this, at the moment the selection hilighting only
                effectively works between two points, there is no understanding of a
                rectangular region.

                I think at one time a boundary line was drawn left and right in a
                different color but I cannot recall if that is a specific command or
                whether this has now been removed.

                Jon.
              • Phillips, Steven
                The mouse Copy Rectangle and Kill Rectangle commands do hilight the rectangle as its defined, they also allow you to go beyond the length of the last line
                Message 7 of 7 , Sep 13, 2006
                • 0 Attachment
                  The mouse 'Copy Rectangle' and Kill Rectangle' commands do hilight the
                  rectangle as its defined, they also allow you to go beyond the length of
                  the last line making them much easier to use. So I recommend you try
                  them (user-setup -> Mouse, I bind Copy Rectangle to Control left button)

                  Steve

                  > -----Original Message-----
                  > From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com]
                  > On Behalf Of Jon Green
                  > Sent: 13 September 2006 20:13
                  > To: jasspa@yahoogroups.com
                  > Subject: Re: [jasspa] recenter revisited
                  >
                  > Rick Owen wrote:
                  > > Wonderful. Thank you. One last question and then I will
                  > go back into
                  > > my cave for a day or two. I understand how to do
                  > rectangular (column)
                  > > operations, which I do frequently. However, is it possible to have
                  > > the highlighting understand rectangular blocks. It would
                  > be nice to
                  > > tell
                  > > me32 to highlight in rectangular mode and have only the
                  > affected block
                  > > be highlighted rather than having to imagine the
                  > rectangular block as
                  > > being between point and mark.
                  > >
                  > > Thanks,
                  > > Rick.
                  > >
                  >
                  > No it will not do this, at the moment the selection
                  > hilighting only effectively works between two points, there
                  > is no understanding of a rectangular region.
                  >
                  > I think at one time a boundary line was drawn left and right
                  > in a different color but I cannot recall if that is a
                  > specific command or whether this has now been removed.
                  >
                  > Jon.
                  >
                  >
                  >
                  > ______________________________________________________________
                  > ____________
                  >
                  > This is an unmoderated list. JASSPA is not responsible for
                  > the content of any material posted to this list.
                  >
                  > To unsubscribe, send a mail message to
                  >
                  > mailto:jasspa-unsubscribe@yahoogroups.com
                  >
                  > or visit http://groups.yahoo.com/group/jasspa and modify your
                  > account settings manually.
                  >
                  >
                  >
                  > Yahoo! Groups Links
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.