search

Home  >  Q&A  >  body text

vim - Copy content to system clipboard

In ex mode
2, 10y
can copy 9 lines, but these contents are not in the system clipboard.

In normal mode, do this
1. Jump to line 2
2gg
2. 8" y Copy the 8 lines below the current cursor, plus the current line, it will be 9 lines.

Can you create a way
In ex mode, enter 2,10" y to copy lines 2 to 10 to the system clipboard?

曾经蜡笔没有小新曾经蜡笔没有小新2714 days ago1008

reply all(1)I'll reply

  • 学习ing

    学习ing2017-06-14 10:52:23

    :2, 10y + The command is [range]y[ank] [x], where [x] is the specified register.

    reply
    0
  • Cancelreply