Copy content in VIM to system clipboard

Source: Internet
Author: User

1 install vim-gnome

1.1 switch sudo Su to root

1.2 apt-Get install vim-gnome

2 select text content

2.1 switch to visualization mode by V

2.2 press the arrow key to select the content (if you need to select the full text, press Gg to position the cursor at the start, enter V, and then enter g to move the cursor to the end)

3. Copy the selected content to the system clipboard.

The clipboard in VIM has a name. Enter reg to see the name of the clipboard. During the copy, you can copy the content to the clipboard with the specified name. The system clipboard name is +

Install vim-gnome to make the system clipboard appear. Otherwise, enter Reg and you will not be able to see +.

Press "+ Y" during replication.

4. Copy

At this time, if you enter Reg, you can see that + is followed by the content you just copied. They have already been placed in the system clipboard. At this time, you can press Ctrl + V to copy the content to the specified location.

References: http://hi.baidu.com/xiaoyu6068/blog/item/346c5f7ea89fc1e32e73b3d7.html

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.