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

dw (or any operator) not working at end of line and beyond

Expand Messages
  • Dimitar DIMITROV
    Test done with the latest version out of mercurial Hi, Here is a bug: if you place your cursor at the end of a line and try dw, all that happens is the
    Message 1 of 4 , Sep 23, 2013
    • 0 Attachment
      Test done with the latest version out of mercurial

      Hi,

      Here is a bug: if you place your cursor at the end of a line and try dw, all that happens is the character under cursor is deleted but the line
      is not joined with the one below. de however is ALMOST working meaning that it does work in the usual settings but not with :se ve=all. In that case,
      if you go beyond the end of a line the joining of lines happens but your cursor position changes to the end of line instead of remaining in its place.

      Regards
       
      Dimitar


      ---
      GPG Key: 2048R/160C6FA8 2012-10-11 Dimitar Dimitrov (kurkale6ka) <mitkofr@...>

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
       
      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Tony Mechelynck
      ... hm, dw deletes just the last character on the line but vw highlights that and also the first character on the next line. w by itself is an exclusive
      Message 2 of 4 , Sep 23, 2013
      • 0 Attachment
        On 23/09/13 10:42, Dimitar DIMITROV wrote:
        > Test done with the latest version out of mercurial
        >
        > Hi,
        >
        > Here is a bug: if you place your cursor at the end of a line and try dw,
        > all that happens is the character under cursor is deleted but the line
        > is not joined with the one below.

        hm, dw deletes just the last character on the line but vw highlights
        that and also the first character on the next line. w by itself is an
        "exclusive" motion, though. You make me wonder if it's a bug or a feature.

        Aah, found it (a few paragraphs below ":help word" and ":help WORD"):

        > Another special case: When using the "w" motion in combination with an
        > operator and the last word moved over is at the end of a line, the end of
        > that word becomes the end of the operated text, not the first word in the
        > next line.

        "the end of that word becomes the end of the operated text", so it is
        indeed a feature, or at least something documented in the help.

        > de however is ALMOST working meaning
        > that it does work in the usual settings but not with :se ve=all. In that
        > case,
        > if you go beyond the end of a line the joining of lines happens but your
        > cursor position changes to the end of line instead of remaining in its
        > place.

        For me, de with ve=all and the cursor beyond the end of the line removes
        the end-of-line and the first word of the next line. So, "the place
        where the cursor was just before I issued the command" doesn't exist
        anymore, and it goes, quite logically IMHO, to the first character after
        the deleted EOL and word.

        the e motion is described as "forward to end of word, inclusive, doesn't
        stop on an empty line".

        >
        > Regards
        > Dimitar
        >

        What is 'selection' set to on your installation?

        :verbose set sel? " with question mark

        Mine is set to "inclusive".


        Best regards,
        Tony.
        --
        The challenge of space exploration and particularly of landing men on
        the moon
        represents the greatest challenge which has ever faced the human race. Even
        if there were no clear scientific or other arguments for proceeding with
        this
        task, the whole history of our civilization would still impel men toward the
        goal. In fact, the assembly of the scientific and military with these human
        arguments creates such an overwhelming case that in can be ignored only by
        those who are blind to the teachings of history, or who wish to suspend the
        development of civilization at its moment of greatest opportunity and drama.
        -- Sir Bernard Lovell, 1962, in "The History of Manned Space Flight"

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Dimitar DIMITROV
        ... You are right, I should have read the help ... You are also right, although in this case I think the cursor not moving would feel more natural with ve=all.
        Message 3 of 4 , Sep 23, 2013
        • 0 Attachment
          >> Test done with the latest version out of mercurial
          >>
          >> Hi,
          >>
          >> Here is a bug: if you place your cursor at the end of a line and try dw,
          >> all that happens is the character under cursor is deleted but the line
          >> is not joined with the one below.
          >
          >hm, dw deletes just the last character on the line but vw highlights
          >that and also the first character on the next line. w by itself is an
          >"exclusive" motion, though. You make me wonder if it's a bug or a feature.
          >
          >Aah, found it (a few paragraphs below ":help word" and ":help WORD"):
          >
          >> Another special case: When using the "w" motion in combination with an
          >> operator and the last word moved over is at the end of a line, the end of
          >> that word
          becomes the end of the operated text, not the first word in the
          >> next line.
          >
          >"the end of that word becomes the end of the operated text", so it is
          >indeed a feature, or at least something documented in the help.

          You are right, I should have read the help

          >> de however is ALMOST working meaning
          >> that it does work in the usual settings but not with :se ve=all. In that
          >> case,
          >> if you go beyond the end of a line the joining of lines happens but your
          >> cursor position changes to the end of line instead of remaining in its
          >> place.
          >
          >For me, de with ve=all and the cursor beyond the end of the line removes
          >the end-of-line and the first word of the next line. So, "the place
          >where the cursor was just before I issued the command" doesn't exist
          >anymore, and it goes, quite logically IMHO, to the first character after
          >the
          deleted EOL and word.

          You are also right, although in this case I think the cursor not moving would
          feel more natural with ve=all. I use this setting and I am used to the cursor
          never moving. Ex: rr when past the line creates all necessary spaces and keeps
          the cursor where it is

          >the e motion is described as "forward to end of word, inclusive, doesn't
          >stop on an empty line".
          >
          >>
          >> Regards
          >> Dimitar
          >>
          >
          >What is 'selection' set to on your installation?
          >
          >    :verbose set sel?        " with question mark
          >
          >Mine is set to "inclusive".

          inclusive as well

          >
          >Best regards,
          >Tony.

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
           
          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Christian Brabandt
          Hi Dimitar! ... I am not sure, this is a bug. If you go past the end of the line and press J or gJ your cursor will also be moved. regards, Christian --
          Message 4 of 4 , Sep 23, 2013
          • 0 Attachment
            Hi Dimitar!

            On Mo, 23 Sep 2013, Dimitar DIMITROV wrote:

            >de however is ALMOST working meaning that it does work in the usual
            >settings but not with :se ve=all. In that case, if you go beyond the
            >end of a line the joining of lines happens but your cursor position
            >changes to the end of line instead of remaining in its place.

            I am not sure, this is a bug. If you go past the end of the line and
            press J or gJ your cursor will also be moved.

            regards,
            Christian
            --
            Pädagogik ist die Art, wie man zuschlägt.
            -- Erwin Pelzig

            --
            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          Your message has been successfully submitted and would be delivered to recipients shortly.