1

I can for example, copy three lines to the clipboard with "+y3j. But I nothing happens when I attempt to yank chars to the clipboard with, say,"+y100l.

Ultimately, I want to copy chunks of 4000 chars.

0

1 Answer 1

2

I think this will work:

:set whichwrap+=h,l

Then you should be able to yank characters, spanning lines.

Unfortunately this has the side effect of having the h and l able to "wrap" across lines if you use them at the beginning/end of a line, so you may want to do this instead:

:se whichwrap+=<,>

Then use the Left and Right arrow keys in your key sequence instead of h or l.

I don't know why your "+y3l doesn't work, as it should work just fine, and works for me.

3
  • Very nice. Thank you. I was wrong to say "+y3l didn't work. As your answer suggests. It didn't work merely for any number of chars that would go beyond the next newline following the current char position.
    – markling
    Commented Jan 24, 2022 at 21:38
  • ah. except it doesn't seem to quite work. Just did "+y100> and got 498 chars. Did "+y5000y and got 8597 chars. whichwrap is set =b,b,<,>
    – markling
    Commented Jan 24, 2022 at 22:53
  • That is, did: "+y5000> and got 8597 chars. (where < and > are right and left arrow-keys)
    – markling
    Commented Jan 25, 2022 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.