vim can not be copied Right

  When in the .vimrc set mouse = a, you may be positioned with the mouse vim code, but the code can not be copied using the right mouse button to another editor.

First of all make it clear that in vim with the mouse positioning code and copy the code right are two opposing functions, can not exist simultaneously. So we need a way to switch this function, no bullshit directly on my .vimrc file

let mapleader = ","

set mouse=a

nnoremap <leader>sv :source $MYVIMRC<cr>

nnoremap <leader>c  :set mouse=r

Add these lines of code in your .vimrc file

Then:

When you need to copy the code with the right mouse button to press, c

When you want to use the mouse positioning code can press, sv

This realization of the function of switching the mouse use, and quickly try it

Guess you like

Origin www.cnblogs.com/123txl/p/11683698.html