Cannot use "+y copy" in Vim

Source: Internet
Author: User

After installing VIM on the new machine, you can use YY to re-hold, but "+y copy to the system Clipboard does not work." Follow the steps below:

1. First to check if your vim version supports +clipboard, the command is: version

Or you can enter: Reg to see if the X and + registers are included

2. If there is support, then the method mentioned above can be, otherwise:

Need to install Vim-gnome

sudo apt-get Install Vim-gnome  

vim-v filename

Then you can use the +y.

Open Vim ~/.VIMRC can see the Clipboard keyword, the content is as follows:

 if  has ( " clipboard    )  if  has (   unnamedplus    )  "  set  clipboard=unnamed,unnamedplus   else    Mac and Windows, use * registe R for Copy-paste  set  clipboard=unname D endif endif  

Original is our previous version does not support clipboard, after installing Vim-gnome can support, system Clipboard function recovery.

Cannot use "+y copy" in Vim

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.