Vim-copy/paste
1. Vim internal clipboard
(1) use the default Clipboard ""
Y → copy. You must specify a range, for example, YW.
Y → equivalent to YY. Copy the current row.
P → paste it behind the cursor.
P → paste in front of the cursor.
(2) Specify the register
"(Register) y (range) → put the content to be copied into the specified register. Register includes all numbers and letters; range is the range, such as W and Y. You can also use the visualization operation to select the content to be copied and then copy it.
"(Register) (times) P → paste the content of the specified register behind the cursor. Times specifies the number of times to be pasted.
2. Vim system clipboard
Sometimes, if we want to copy and paste the content of other applications to VIM, or copy and paste the content between vim, we need to use the system clipboard. In addition to VIM, you can use Ctrl + insert to copy the selected content to the clipboard and use Shift + insert to paste the content. You can also directly select the content to be copied and then copy the content to the cursor by pressing SHIFT + insert or in the middle of the mouse.
"+ Y (range) → copy the selected content to the system clipboard, and paste it into other vim. It is worth noting that it cannot be pasted into other applications.
"+ (Times) P → paste the content in the system clipboard to the current cursor.