0

Most methods of copying to the system clipboard from vim involve using visual selection. I don't want to do that because I have to copy text that spans multiple screens. It's faster for me to use marks.

If I was just yanking the lines, I'd do:

/<<<<< # find the beginning of my diff
ma     # set mark `a` to the current position
/===== # find the end of my diff
y'a    # yank all lines between the current position and mark `a`.

I presume there's some way to y'a into a specific register, or transfer from the unnamed register to the selection register *.

Community
  • 1
  • 1
Heath Borders
  • 29,483
  • 16
  • 137
  • 246

1 Answers1

1

You can do:

:'a,.y *

or (shorter):

:'a,y *

See :help :y.

romainl
  • 172,579
  • 20
  • 259
  • 291