vim insert VISUAL模式无法右键复制问题(转)

转自:https://blog.csdn.net/coder_oyang/article/details/89096219

 

 

vim中使用鼠标右键粘贴,失败。vim的模式:

 

 

网上解法:

1. 普通模式下输入“:set mouse-=a”,有效

2. .vimrc中添加:

if has('mouse')
set mouse-=a
endif
失效

查资料发现:vi的三种模式,命令模式,插入模式,可视模式。鼠标可以启动于各种模式中:

The mouse can be enabled for different modes:
n Normal mode
v Visual mode
i Insert mode
c Command-line mode
h all previous modes when editing a help file
a all previous modes
r for |hit-enter| and |more-prompt| prompt
Normally you would enable the mouse in all four modes with:
:set mouse=a
When the mouse is not enabled, the GUI will still use the mouse for
modeless selection. This doesn't move the text cursor.
所以配置文件中,set moues=a启动了所有模式,屏蔽了鼠标右键功能

但,我的 .vimrc文件并没这配置,最终发现:

无需修改任何配置,鼠标选中,按y键 -- 复制, 然后按 鼠标中键 粘贴,支持跨文件复制粘贴
————————————————
版权声明:本文为CSDN博主「coder_oyang」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/coder_oyang/article/details/89096219

posted @ 2019-08-22 10:08  kuroniko  阅读(6335)  评论(1编辑  收藏  举报