Modify the default copy and paste Key Binding settings of vimacs

Source: Internet
Author: User
I used the vimacs plug-in gvim, but C-y can only paste the content copied in gvim, and there is no way to paste anything other than gvim. ProgramCopy the content to the Windows clipboard.
I took a closer look at CodeTo paste the content copied from other programs to the Windows clipboard, use the key shift + insert. to paste the content copied from gvim to the clipboard, use the C-y key.
Similarly, in gvim, M-W can only copy the selected content to the gvim clipboard. In gvim, copy the selected content to the clipboard of windows, the key control + insert is required.
This setting is somewhat annoying! In most cases, after I copy the content, I paste it. The paste must be a document in gvim. I need to copy it to make it available everywhere. I was a little confused by the meticulous division of key functions like vimacs.
In order for M-W to copy the content to both gvim and Windows clipboard
Vnoremap <c-ins> "* y
Change
Vnoremap <m-W> "* y
You can.
To enable C-y to paste the latest copied content from gvim or Windows clipboard
Inoremap <s-ins> <c-r> <c-o> *
Change
Inoremap <c-y> <c-r> <c-o> *
You can.
Now, this setting is exactly the same as that in my Emacs. It is much more comfortable to use. This method has only been tested in windows, and other platforms have the opportunity to test it again.

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.