Debian12中vi/vim鼠标复制粘贴问题

背景

MobaXterm远程Debian12,vim中鼠标执行复制粘贴,自动进入可视化模式(Visual mode),无法正常复制粘贴

解决方案

vim /etc/vim/vimrc.local 新增以下内容

set number  " vim编辑文件默认显示行号

source $VIMRUNTIME/defaults.vim  " $VIMRUNTIME 是vim内部的一个环境变量,指向vim的运行时文件目录
let skip_defaults_vim = 1  " 避免重复加载默认配置
if has('mouse')
    set mouse-=a
endif

 

参考资料:
https://www.preining.info/blog/2017/10/fixing-vim-in-debian/
posted @ 2025-06-01 16:51  OpsDrip  阅读(157)  评论(0)    收藏  举报