How can I yank multiple lines into a register?
Problem
I want to yank multiple lines in a single register in vim, to easily paste different text templates in a document. For example, "iyy yanks only the the current line, if I try to select multiple lines in visual-mode, it isn't written into the register. Any suggestions?
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: How can I yank multiple lines into a register?
Use to yank 3 lines into the default register; for yanking into register i. Also, my favorite way is not to count the lines I want to yank, but to select them in visual mode via and moving commands, and then hit to yank it or to yank into a register. Also, I have just tried selecting multiple lines in Visual Line mode and yanking into not-default register, e.g. — and it works.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix