在启用 set mouse=a 的情况下在 Vim 之外复制文本 [英] Copying text outside of Vim with set mouse=a enabled

查看:26
本文介绍了在启用 set 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):选择时按住 alt/option ()

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

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

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