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

Re: move a range of text to address?

Expand Messages
  • Tim Chase
    ... I don t think there s a way to move a line to another buffer/file. I believe the destination has to be within the same file. So you can do ... to move
    Message 1 of 8 , Nov 13, 2012
      On 11/13/12 15:45, BartlebyScrivener wrote:
      > As long as there are so many :m wizards around.
      >
      > The instructions for the address suggest that you could move the text to 'T but it doesn't seem to work if 'T is in another buffer.
      >
      > For example
      >
      > :'a,'bm 'T
      >
      > Is there a way to do this using :m ?

      I don't think there's a way to move a line to another buffer/file.
      I believe the destination has to be within the same file. So you can do

      :10ka
      :20kb
      :30kc
      :'a,'b m 'c

      to move lines 10-20 to after line 30 all within the same buffer.

      Looking at

      :help :m

      it gives the syntax as ":[range]m[ove] {address}", so looking at the
      help for

      :help {address}

      which states "when the mark is in another file it cannot be used in
      a range". It might be better clarified to include "or as a
      destination for a :move or :copy".

      -tim



      --
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.