在Debian 9 vim中启用鼠标复制粘贴

新版本的Debian系统中,安装的vim无法使用鼠标左右键来完成复制和粘贴了。研究一番后,发现这是因为vim无视了鼠标。因此,我们可以使用下面这个方法实现鼠标复制粘贴。

本文为香菇肥牛原创,原文链接为https://qing.su/article/136.html, 转载请注明原文链接。谢谢。

执行命令:

1
touch /etc/vim/vimrc.local

然后编辑文件 /etc/vim/vimrc.local 加入下面的行:

1
2
3
4
5
source /usr/share/vim/vim80/defaults.vim
let skip_defaults_vim = 1
    if has('mouse')
set mouse=r
endif

这个启用了鼠标的配置文件覆盖了vim的配置。这样,我们再使用vim的时候就可以使用鼠标来复制粘贴了。

本文为香菇肥牛原创,原文链接为https://qing.su/article/136.html, 转载请注明原文链接。谢谢。

14 thoughts on “在Debian 9 vim中启用鼠标复制粘贴”

  1. It is appropriate time to make a few plans for the long
    run and it’s time to be happy. I have learn this submit
    and if I may just I wish to counsel you few fascinating things or tips.
    Perhaps you could write next articles referring to
    this article. I want to learn more things about it! asmr 0mniartist

    Reply
  2. It’s actually very difficult in this busy life to listen news on Television, therefore I just use internet for that reason, and take the latest news.
    asmr 0mniartist

    Reply
  3. scoliosis
    Hi there, I want to subscribe for this website to obtain most recent updates, therefore where can i do it
    please help. scoliosis

    Reply

Leave a Comment