Ubuntu content copy to browser under VIM

Source: Internet
Author: User

Edit the code in vim to copy it to the browser or somewhere else. After the copy with YY to go to another place sticky post found that is not the original copy of the content, very headache ...

This is due to the fact that Vim has its own set of Clipboard systems (clipboard). This system is not interoperable with Ubuntu's clipboard.

After seeing a lot of posts saying you've selected what you want, press 3 keys "+y (the number, plus, and y) so that the copied content goes into the system Clipboard.

That's only half right. ~_~

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

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

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

Need to install Vim-gnome

sudo apt-get install Vim-gnome
Open the file you want to compile gvim-v filename

Then you can use the +y.

Ability to define alias in. BASHRC

Alias GVi = ' Gvim-v '

The next time you open the file, you can use GVI filename.

------------------------------------------------------------------------I am a gorgeous cutting line----------------------------------------- ------------------------------------

With the Vim-gnome package installed, VIM will be able to support clipboard.

Then add in the $HOME/.VIMRC:

Set Clipboard=unnamedplus
You can then use Y and p to arbitrarily copy the contents of the paste (to) other places (no more "+y press three keys so troublesome!"

。 )

Ubuntu content copy to browser under 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.