vim insert VISUAL模式

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键 -- 复制, 然后按 鼠标中键 粘贴,支持跨文件复制粘贴

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值