Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

into a buffer?

buffer
0
Posted

into a buffer?

0

:global” command to yank all the lines containing the pattern into a register and then paste the contents of the register into the buffer: :let @a=” :g/mypattern/y A The first command, clears the contents of the register “a”. The second command copies all the lines containing “mypattern” into the register “a”. Note that the capital letter “A” is used to append the matched lines. Now you can paste the contents of register “a” to a buffer using “ap command. For more information, read :help :g :help :y :help let-register :help quote_alpha :help put :help registers :help :registers 12.10.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123