Copy and paste Vim

Source: Internet
Author: User
The clipboard-related content in the Vim Help document is as follows:
Vim has 12 clipboard, which are 0, 1, 2,..., 9, A, ", and +. You can use the: Reg command to view the content of each clipboard. In vim, simply copy Y to the "(double quotation marks) clipboard. P is also used to paste the content in the clipboard;

To copy Vim content to a clipboard, You need to exit the editing mode. after entering the normal mode, select the content to be copied, and then press "NY" to complete the copy, n is the clipboard number (note that double quotation marks are followed by the clipboard number and then followed by Y). For example, to copy the content to clipboard a, select the content and press "ay, there are two points to note:
"No. Clipboard (temporary clipboard) is special. Press Y to copy it to the clipboard. Press P to paste the content in the clipboard;
+ The No. Clipboard is a system clipboard. After you copy the content to the clipboard with "+ Y", you can use Ctrl + V to paste it into other documents (such as Firefox and gedit). Similarly, to copy the content copied by pressing CTRL + C or right-click elsewhere to VIM, press "+ P in normal mode;

To paste the content in a clipboard of VIM, You need to exit the editing mode. In normal mode, press "NP, where N is the clipboard number, as described above, you can press "5 p to paste the content in the 5 th clipboard, or press" + P to paste the content in the global clipboard of the system.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.