On Thu, Jul 23, 2020 at 06:40:17PM -0500, Tim Chase wrote:
> On 2020-07-24 04:43, Manas wrote:
> >
> > I want to yank those lines in order to paste somewhere else. In this
> > particular case, I wanted to send it to someone.
> 
> Ah, the typical idiom here is to empty a register and then
> yank-appending (yank into a capital-letter-named register) each of
> the matching lines like
> 
>   :let @a='' | g/^-/y A
> 
It worked like a charm. Apparently, the right command was `:g/^-/y A`
instead of `:g/^-/normal yy`. Although I am not able understand the use
of `A` after `y`. Can you please explain that?
Once again thanks a lot for your help!
-- 
Manas
CSAM Undergraduate | 2022
IIIT-Delhi, India
-- 
-- 
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@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200724000656.gzp3vydu2cotcebs%40nitro-5.
Thursday, July 23, 2020
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment