how to copy/cut text from vim to system clipboard use line number

lazybios

Be just like title,I know how to copy/cut to system clipboard "+yy,and it works! But my question is how can I use line number copy/cut section text,such as use :1,10y to yank 1 to 10 lines,can I use the same way to copy/cut to system clipboard,if can not ? Is there a simliar way for the same purpose ? (Actually,I have try to :1,10"+yy,but did not worked !)

Ingo Karkat

You only need the "{reg} prefix for normal mode, to indicate that you want to specify a register. For Ex commands, you just append the register name.

:1,10yank +

Learn how to look up commands and navigate the built-in :help; it is comprehensive and offers many tips. You won't learn Vim as fast as other editors, but if you commit to continuous learning, it'll prove a very powerful and efficient editor. :help :yank explains this:

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to disable vim pasting to/from system clipboard?

From Dev

Yank file path with line no from vim to system clipboard

From Dev

How to pipe text from command line to the clipboard

From Dev

How to copy text from pentadactyl to system clipboard?

From Java

How to make vim paste from (and copy to) system's clipboard?

From Dev

Copy vim selected text to system clipboard

From Dev

Unable to copy from vim to system clipboard

From Dev

Copy from Vim visual mode to system clipboard

From Dev

Unable to copy from vim to system clipboard

From Dev

Unable to copy from vim to system clipboard

From Dev

Copy from Vim visual mode to system clipboard

From Dev

How to copy text from command line to clipboard without using the mouse?

From Dev

How to send rich text to the clipboard from command line?

From Dev

Vim: How do I paste a column of text (from clipboard) after a different column of text?

From Dev

How to use a common clipboard for vim and Unity?

From Dev

vim and system clipboard

From Dev

vim and system clipboard

From Dev

VIM with system clipboard support

From Dev

How to use set line number in file along with vim command

From Dev

How to copy one line from a text document to clipboard using command prompt

From Dev

How to Send the Contents of a Text File to the Clipboard from the Command Line in OS X?

From Dev

how to paste into tmux from system clipboard

From Dev

How to access system clipboard from a chroot environment?

From Dev

Vim mapping copy to system clipboard

From Java

How to copy to clipboard in Vim?

From Dev

How to copy text from a div to clipboard

From Dev

How to copy text to / from clipboard in Go?

From Dev

How to copy text to Clipboard from TextField in Android

From Dev

How to paste text from clipboard with jQuery Mobile?

Related Related

  1. 1

    How to disable vim pasting to/from system clipboard?

  2. 2

    Yank file path with line no from vim to system clipboard

  3. 3

    How to pipe text from command line to the clipboard

  4. 4

    How to copy text from pentadactyl to system clipboard?

  5. 5

    How to make vim paste from (and copy to) system's clipboard?

  6. 6

    Copy vim selected text to system clipboard

  7. 7

    Unable to copy from vim to system clipboard

  8. 8

    Copy from Vim visual mode to system clipboard

  9. 9

    Unable to copy from vim to system clipboard

  10. 10

    Unable to copy from vim to system clipboard

  11. 11

    Copy from Vim visual mode to system clipboard

  12. 12

    How to copy text from command line to clipboard without using the mouse?

  13. 13

    How to send rich text to the clipboard from command line?

  14. 14

    Vim: How do I paste a column of text (from clipboard) after a different column of text?

  15. 15

    How to use a common clipboard for vim and Unity?

  16. 16

    vim and system clipboard

  17. 17

    vim and system clipboard

  18. 18

    VIM with system clipboard support

  19. 19

    How to use set line number in file along with vim command

  20. 20

    How to copy one line from a text document to clipboard using command prompt

  21. 21

    How to Send the Contents of a Text File to the Clipboard from the Command Line in OS X?

  22. 22

    how to paste into tmux from system clipboard

  23. 23

    How to access system clipboard from a chroot environment?

  24. 24

    Vim mapping copy to system clipboard

  25. 25

    How to copy to clipboard in Vim?

  26. 26

    How to copy text from a div to clipboard

  27. 27

    How to copy text to / from clipboard in Go?

  28. 28

    How to copy text to Clipboard from TextField in Android

  29. 29

    How to paste text from clipboard with jQuery Mobile?

HotTag

Archive