使用设置的mouse = a在Vim之外复制文本 [英] Copying text outside of Vim with set mouse=a enabled
问题描述
启用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屋!