2008/12/11

copy and paste in VIM

VIM have multiple clipboard which allows you copy and save different content at the same time. The register can be any of {a-zA-Z0-9.%#:-"}. It is really interesting thing which I never notice before.

"{a-zA-Z0-9.%#:-"} Use register {a-zA-Z0-9.%#:-"} for next delete, yank
or put (use uppercase character to append with
delete and yank) ({.%#:} only work with put).

:reg[isters] Display the contents of all numbered and named
registers. {not in Vi}

:reg[isters] {arg} Display the contents of the numbered and named
registers that are mentioned in {arg}. For example:

["x]y{motion} Yank {motion} text [into register x]. When no
characters are to be yanked (e.g., "y0" in column 1),
this is an error when 'cpoptions' includes the 'E'
flag.

["x]p Put the text [from register x] after the cursor
[count] times. {Vi: no count}


I forgot there is another register *, it is as same as the system clipboard. So you can yank some text into register *, it will be in the system clipboard also. :D

没有评论:

BlockChain 相关电子书

@copyright of Sam Chadwick   - https://thehub.thomsonreuters.com/groups/bitcoin/blog/2017/09/10/blockchain-paper Blockchain Papers A c...