Debian – vim: Unable to copy & paste in Debian Stretch

debianvim

After upgrading to Debian Stretch, we have been unable to copy&paste with the mouse in MacOS Sierra and Windows clients alike.

I have tried several solutions, including from this thread, without much sucess. Copy-paste for vim is not working when mouse (:set mouse=a) is on?

I have tried to place in /etc/vim/vimrc.local the followings lines:

set vb t_vb=
set mouse="" 

and besides mouse="", mouse="a" mouse="r" and mouse="v", and none of the solutions worked.

What do seems to work, it to comment in the file /usr/share/vim/vim80/defaults.vim the following lines:

"if has('mouse')
"  set mouse=a
"endif

As soon those lines are commented out, we are able to copy&paste again.

However, those changes are lost in the next vim upgrade.

Any suggestions for a more permanent solution?

Best Answer

It's

set mouse=r

I did edit the default file because there were more defaults changed since jessie.

vi /usr/share/vim/vim80/defaults.vim

because somehow now syntax highlighting was on at default and all the users complained.