## 问题 使用 [MobaXterm](https://mobaxterm.mobatek.net/) ssh 登录远程服务器,vim编辑文件时,无法使用鼠标选中文字复制和粘贴。 ## 解决方法 vim 命令输入: ``` set mouse=r ``` 如果不行尝试: ``` set mouse=v ``` 可以将上述命令加入 ~/.vimrc 中。 ## help help mouse 帮助信息: ``` n Normal mode v Visual mode i Insert mode c Command-line mode h all previous modes when in a help file a all previous modes r for |hit-enter| prompt ``` ## 参考 * [Copy-paste for vim is not working when mouse (:set mouse=a) is on?](https://unix.stackexchange.com/questions/139578/copy-paste-for-vim-is-not-working-when-mouse-set-mouse-a-is-on) * [解决vim在MobaXtem和Xshell等终端不能复制的问题](https://blog.csdn.net/JineD/article/details/109468621)