Copying text outside of Vim with set mouse=a enabled

后端 未结 14 814
陌清茗
陌清茗 2020-12-07 06:54

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?

Here, selecting text with t

14条回答
  •  自闭症患者
    2020-12-07 07:33

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

    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): hold alt/option while selecting (source)

提交回复
热议问题