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

执行命令:

touch /etc/vim/vimrc.local

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

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

最后修改日期: 2022年1月29日