[Share Experiences] 终端vim 无法用鼠标复制黏贴,解决办法
Tofloor
poster avatar
zeyark
deepin
2023-08-14 18:48
Author

deepin 的vim 无法在终端用鼠标复制黏贴,修改文件 /usr/share/vim/vim81/defaults.vim

sudo vi /usr/share/vim/vim81/defaults.vim

找到 这个:

if has ('mouse')

set mouse=a

改为 set mouse -=a

保存退出后就能用鼠标复制黏贴了。

Reply Favorite View the author
All Replies
阿尼樱奈奈
Moderator
2023-08-14 18:51
#1

like(但是我现在习惯用快捷键复制粘贴了)

Reply View the author
蔡EEPIN
deepin
2023-08-14 19:04
#2

支持一下,之前都是手动在vim里设置joy

Reply View the author
今风
deepin
2023-08-14 21:41
#3

谢谢分享。

Reply View the author
deepinuser17
deepin
2023-08-15 04:45
#4

建议不要修改系统文件, /usr/share/vim/vim81/defaults.vim. 这个文件在升级时可能会被覆盖.

用户可以设置自己的vim配置. 创建这个文件, /home/<用户名>/.vimrc. 在这个文件里加入设置.

例如:

set mouse=r
set backspace=indent,eol,start
set ruler

set tabstop=4
set shiftwidth=4

Reply View the author