vi copy and paste under linux

====The following content is not correct, to be verified and corrected ==========

If you just want to use the system pasteboard, you can press Shift+Inset directly in the input mode. Let's talk about the basic knowledge of vim's pasteboard. If you are interested, you can take a look and you should get something.
The contents related to the pasteboard in the vim help document are as follows:

   1. There are 12 pasteboards in vim, which are 0, 1, 2, ..., 9, a, ", +; you can view each pasteboard with the :reg command. In vim, simply use y to copy to the " (double quotation marks) pasteboard, and also use p to paste the content in this pasteboard;

       
   2. To copy the content of vim to a pasteboard, you need to Exit the editing mode, enter the normal mode, select the content to be copied, and then press "Ny to complete the copy, where N is the pasteboard number (note that press the double quotation mark, then press the pasteboard number and finally press y), for example, to copy the content Go to the pasteboard a, select the content and press "ay", there are two points to explain:
          * "The pasteboard (temporary pasteboard) is special, just press y to copy it to this pasteboard, and press p directly. Just paste the content in this pasteboard;
          * + pasteboard is the system pasteboard, after copying the content to the pasteboard with "+y, you can use Ctrl+V to paste it into other documents (such as firefox, gedit), the same is true , to copy the content copied with Ctrl+C or right-click in other places to vim, you need to press "+p in normal mode;

       
   3. To paste the content of a pasteboard in vim, you need to exit the editing mode, in normal mode Mode press "Np, where N is the number of the pasteboard. As mentioned above, you can press "5p to paste the content in the No. 5 pasteboard, or you can press "+p to paste the content in the system global pasteboard.

Excerpted from: http://www.cnblogs.com/softwaretesting/archive/2011/07/12/2104434.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326558744&siteId=291194637