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

Re: :g/regex/m0 possible move to buffer

Expand Messages
  • Tim Chase
    ... One caveat I forgot to mention with this solution: if you have an empty buffer, it actually has a single blank line in it, so you ll end up with an
    Message 1 of 2 , Jan 26, 2007
    • 0 Attachment
      >> :let @a='' | g/pattern/d A
      >>
      >> go to the other buffer/tab/window and
      >>
      >> "aP
      >
      > Thanks Tim! This will work well.

      One caveat I forgot to mention with this solution: if you have
      an "empty" buffer, it actually has a single blank line in it, so
      you'll end up with an extra blank line at the end of the
      destination. Or if you use "ap instead of "aP the blank line
      will be at the top. So you'll have to clean up that line if it
      matters.

      > It's not only the quality of the answers, but the quick response that
      > makes this vim list great!

      Agreed...the only other list I've been on that's been remotely
      close is the Python mailing list, but it is a bit more caustic at
      times.

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