9

I'm yanking range of lines to system clipboard in vim. I can do it with 51gg116"+yy. I'd like to do it via : notation. I can copy to "" register via command :51,116y. However, command 51,116"+y doesn't work. How to fix the last command?

Loom
  • 9,768
  • 22
  • 60
  • 112

1 Answers1

6

:help :y says:

:[range]y[ank] [x]  Yank [range] lines [into register x]. Yanking to the
                    "* or "+ registers is possible only when the
                    |+clipboard| feature is included.

so your answer is obviously:

:51,116y +

Your problem is that you try to use :y, the Ex command, as if it was y, the normal mode command.

Jean-François Fabre
  • 137,073
  • 23
  • 153
  • 219
romainl
  • 186,200
  • 21
  • 280
  • 313