Vim copies the entire contents of the file to the system Clipboard

Source: Internet
Author: User

Reference: Http://vim.wikia.com/wiki/%22copy_all_to_clipboard%22_howto

Vim has two buffers for the system's clipboard, they are: * (primary selection) and + (clipboard), where + is we can normally use ctrl-c and ctrl-v buffer, and to take out * Buffer content, click the middle of the mouse wheel can be.

View buffer contents can be used with the command : Reg , above two buffers shown as "* and " +

1.Normal Mode

GG"*yggg"+yg

2.Visual Mode (linewise) supplement: Press V to enter the mode

Ggog"+y

3.Visual mode (characterwise or Blockwise) supplement: Press V to enter the mode

Vggog"+y

This article only post the commands that have been tested successfully, and the subsequent additions are pending testing.

Environment: Vim7.4

Vim copies the entire contents of the file to the system Clipboard

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.