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

Re: delete last character of multiple lines

Expand Messages
  • James
    ... Hi Yoni, I m not a regex expert. I usually do that sort of thing with a macro. qq // start recording macro q $ // move cursor to end
    Message 1 of 10 , May 9 4:37 AM
    • 0 Attachment
      On May 8, 10:01 am, yoni kessler <yoni101kess...@...> wrote:
      >
      > I tried to delete the last character of multiple lines in the following way:

      Hi Yoni,

      I'm not a regex expert. I usually do that sort of thing with a macro.

      qq // start recording macro 'q'
      $ // move cursor to end of current line
      x // delete character
      j // move down to next line
      q // stop recording macro

      Now you can delete the last character of ten lines starting at the
      line containing the cursor with the following command.

      10@q

      James

      --
      --
      You received this message from the "vim_use" 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_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+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.