使用设置的mouse = a在Vim之外复制文本 [英] Copying text outside of Vim with set mouse=a enabled

查看:218
本文介绍了使用设置的mouse = a在Vim之外复制文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

启用set mouse=a后,复制到Vim内部的文本将不会粘贴到Vim外部.有人知道解决此问题的方法吗?

After enabling set mouse=a, text copied inside of Vim will not paste outside of Vim. Does anybody know of a way to fix this?

在这里,用鼠标选择文本会打开可视模式并禁用弹出菜单中的Copy选项:

Here, selecting text with the mouse turns on visual mode and disables the Copy option in the popup menu:

推荐答案

在用鼠标选择时按 shift .这将使鼠标选择的行为就像未启用mouse=a一样.

Press shift while selecting with the mouse. This will make mouse selection behave as if mouse=a was not enabled.

注意:此技巧也适用于中间按钮粘贴":如果要粘贴在外部选择的vim文本,请在单击中间按钮的同时按 shift .只需确保插入模式已激活即可(您可能还想:set paste以避免意外的效果).

Note: this trick also applies to "middle button paste": if you want to paste in vim text that was selected outside, press shift while clicking the middle button. Just make sure that insert mode is activated when you do that (you may also want to :set paste to avoid unexpected effects).

OS X(mac): 选择()

OS X (mac): hold alt/option while selecting (source)

这篇关于使用设置的mouse = a在Vim之外复制文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆