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

Re: yanking all matches

Expand Messages
  • John Proctor
    ... yanks all lines with foobar into register a for putting with ap
    Message 1 of 2 , May 30, 2002
    • 0 Attachment
      On Thursday 30 May 2002 11:38 pm, Ben Leighton wrote:
      > using
      >
      > /foobar/
      >
      > in a file
      >
      > how can I yank all instances of foobar to a buffer?
      >
      > I've tried :/foobar/y
      > but that only yanks the first match (?).

      :let @a=''
      :g/foobar/y A

      yanks all lines with foobar into register a for putting with "ap
    Your message has been successfully submitted and would be delivered to recipients shortly.