How vim pastes replication with the outside world

Source: Internet
Author: User

In the process of learning to use VIM, we know that in vim, the paste copy of the command is y/p, but we always encounter such a problem: How to paste the contents of vim inside the vim or copy of the content of the vim outside to paste into vim?

After many online access to information, and finally learned how to achieve this process

First, let's take a look at the concept: Vim Buffers and system Clipboard

Vim inside the paste copy is actually accessing data in the VIM buffer

And the system's Ctry+c ctry+v is the interaction with the system Clipboard

I do not know that I am not accurate description, anyway that is probably the meaning: Vim paste copy and system paste copy operation is not the same thing, so the system and vim is not so easy to use directly between

However, this problem can still be solved.

1. Open a file with vim and execute the command: REG to see if there is a + or x number or execute: Version command to see if there are +clipboard

If present:

You can use the +y to copy the contents of vim to the system Clipboard or +p the contents of the system Clipboard into vim.

If it does not exist:

You need to install Vim-gnome, then you can paste the copy with the above command

2. You can set the Clipboard=unnamedplus inside the/ETC/VIM/.VIMRC so that you can directly paste the copy using the y P command

  

How vim pastes replication with the outside world

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.