Wednesday, June 4, 2008

Appending to a register in vim

For example, you want to collect a sequence of lines into the a register. Yank the first line with:

"aY

Now move to the second line, and type:

"AY

Repeat this command for all lines. The a register now contains all those lines, in the order you yanked them.



Reference : Vim manual

3 comments:

Anonymous said...

Thanks. Exactly what I needed.

Anonymous said...

Thanks for the tip, but does this also work for the System Clipboard ("*)?

Jesse said...

Wicked, I knew this must be possible. Thanks!