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

possible bug in $ ^

Expand Messages
  • Siddhartha Kasivajhula
    Hi, I am using gVim 7.2 for Windows. I notice that when you press $, the cursor goes to the end of the line, *and then stays at the end of every line when you
    Message 1 of 5 , Oct 24, 2008
    • 0 Attachment
      Hi,
       
      I am using gVim 7.2 for Windows. I notice that when you press $, the cursor goes to the end of the line, *and then stays at the end of every line when you move it up or down*, but when you type ^, the cursor goes to the beginning of the current line, but does not stay at the beginning of the line when you move to a different line (by using j,k), but instead stays in the same column.
       
      Is this the expected behavior? I wonder if it would be better for it to maintain position as "beginning of line" across lines when ^ is pressed, similar to the behavior of $.
       
      Thanks,
      -Siddhartha
       

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---

    • Tony Mechelynck
      ... I think this is intended behaviour. AFAIK there s no command which will make j k etc. move zig-zag to always the first non-blank. Best regards,
      Message 2 of 5 , Oct 24, 2008
      • 0 Attachment
        On 24/10/08 21:28, Siddhartha Kasivajhula wrote:
        > Hi,
        >
        > I am using gVim 7.2 for Windows. I notice that when you press $, the
        > cursor goes to the end of the line, *and then stays at the end of every
        > line when you move it up or down*, but when you type ^, the cursor goes
        > to the beginning of the current line, but does not stay at the beginning
        > of the line when you move to a different line (by using j,k), but
        > instead stays in the same column.
        >
        > Is this the expected behavior? I wonder if it would be better for it to
        > maintain position as "beginning of line" across lines when ^ is pressed,
        > similar to the behavior of $.
        >
        > Thanks,
        > -Siddhartha

        I think this is intended behaviour. AFAIK there's no command which will
        make j k <Up> <Down> etc. move zig-zag to always the first non-blank.

        Best regards,
        Tony.
        --
        Mathematicians often resort to something called Hilbert space, which is
        described as being n-dimensional. Like modern sex, any number can
        play.
        -- Dr. Thor Wald, in "Beep/The Quincunx of Time", by
        James Blish


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Andy Wokula
        ... The opposite of $ is 0 or | , but not ^ . The opposite of ^ is g_ (go to the last non-blank in the line). Press - and + (or Enter) to move up
        Message 3 of 5 , Oct 25, 2008
        • 0 Attachment
          Siddhartha Kasivajhula schrieb:
          > Hi,
          >
          > I am using gVim 7.2 for Windows. I notice that when you press $, the cursor
          > goes to the end of the line, *and then stays at the end of every line when
          > you move it up or down*, but when you type ^, the cursor goes to the
          > beginning of the current line, but does not stay at the beginning of the
          > line when you move to a different line (by using j,k), but instead stays in
          > the same column.
          >
          > Is this the expected behavior? I wonder if it would be better for it to
          > maintain position as "beginning of line" across lines when ^ is pressed,
          > similar to the behavior of $.
          >
          > Thanks,
          > -Siddhartha

          The opposite of $ is 0 or | , but not ^ .
          The opposite of ^ is g_ (go to the last non-blank in the line).
          Press - and + (or Enter) to move up and down staying on the first
          non-blank.

          --
          Andy


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Richard Hartmann
          On Sat, Oct 25, 2008 at 12:03, Andy Wokula wrote: This mail is more or less useless, but.. ... ..wow. I love Vim :) Thanks for this! Richard
          Message 4 of 5 , Oct 25, 2008
          • 0 Attachment
            On Sat, Oct 25, 2008 at 12:03, Andy Wokula <anwoku@...> wrote:

            This mail is more or less useless, but..

            > Press - and + (or Enter) to move up and down staying on the first
            > non-blank.

            ..wow. I love Vim :)


            Thanks for this!
            Richard

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Siddhartha Kasivajhula
            Oh, sorry, I ve been sending mail using my other email address that isn t registered with vim_dev. Here s my latest email to this thread (below this one).
            Message 5 of 5 , Nov 6, 2008
            • 0 Attachment
              Oh, sorry, I've been sending mail using my other email address that isn't registered with vim_dev. Here's my latest email to this thread (below this one).
              Thanks!
              -Siddhartha

               
              On Thu, Nov 6, 2008 at 5:06 PM, Siddhartha Kasivajhula <siddhartha.kasivajhula@...> wrote:
              >The opposite of  $  is  0  or  | , but not  ^ .
              >The opposite of  ^  is  g_  (go to the last non-blank in the line).
              >Press  -  and  + (or Enter) to move up and down staying on the first
              >non-blank.
               
              Hmm, sorry to bring this up again, but despite emerging from this thread wiser, I'm not entirely convinced that this isn't a bug :). It seems to me that if $ goes to the last character on the line and stays on the last character on every line when we press j and k, then ^ should, in a similar manner, stay on the first non-blank on every line when j and k are pressed. As in, it should move up and down, but our line position should still be "first non-blank character". - and + work, of course, but their purpose is exactly "move one line up/down and go to first non-blank", which I think is independent of the previous command issued (which could be ^ or anything else).
              Even if this isn't a bug, it sounds like it would be a logically correct feature to add.
               
              No?

               
              On Sun, Oct 26, 2008 at 8:50 PM, Siddhartha Kasivajhula <siddhartha.kasivajhula@...> wrote:
              Oh, I see! Thanks.


               
              On Sat, Oct 25, 2008 at 10:32 AM, Richard Hartmann <richih.mailinglist@...> wrote:

              On Sat, Oct 25, 2008 at 12:03, Andy Wokula <anwoku@...> wrote:

              This mail is more or less useless, but..

              > Press  -  and  + (or Enter) to move up and down staying on the first
              > non-blank.

              ..wow. I love Vim :)


              Thanks for this!
              Richard

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---

            Your message has been successfully submitted and would be delivered to recipients shortly.