(Updated as per discussion in comments)
Ok so just follow these frustrating steps to make vim behave sanely (allow mouse copy and keep syntax highlighting):
Option 1: 'system-wide'
- in
/etc/vimrc, uncommentsource $VIMRUNTIME/defaults.vim - in
/etc/vimrc.localaddset mouse=v - for every user that is effected create a a
.vimrceg.:touch ~/.vimrcsudo touch /root/.vimrc
Option 2: per user
For every affected user add this to their ~/.vimrc
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
set mouse=v
More info / rant:
I had to play around a lot to figure this out, mainly on debian/mxlinux. I'm baffled why there is no easier way to configure system-wide defaults without having a .vimrc in each user home :'(
Apparently /etc/vimrc and /etc/vimrc.local are ignored if there is no ~/.vimrc
https://github.com/vim/vim/issues/2042
Not having mouse select by default is sooo annoying :'(