Copying text outside of Vim with set mouse=a enabled

后端 未结 14 868
陌清茗
陌清茗 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:13

    Add set clipboard=unnamed to your .vimrc. So it will use the clipboard register '*' instead of the unnamed register for all yank, delete, change and put operations (note it does not only affect the mouse).

    The behavior of register '*' depends on your platform and how your vim has been compiled (or if you use neovim).

    If it does not work, you can try with set clipboard=unnamedplus, but this option only makes sense on X11 systems (and gvim therefore).

提交回复
热议问题