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
  • 30,998
  • 16
  • 147
  • 256

1 Answers1

1

You can do:

:'a,.y *

or (shorter):

:'a,y *

See :help :y.

romainl
  • 186,200
  • 21
  • 280
  • 313