A partir de Debian 9, la souris ne sert plus a faire du copier/coller dans vi. Nous allons réparer cette innomable injustice !

Debian 9 :

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

Debian 10 :

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

Debian 11 :

vi /usr/share/vim/vim82/defaults.vim

Commenter les lignes suivantes, comme ceci :

" In many terminal emulators the mouse works just fine. By enabling it you
" can position the cursor, Visually select and scroll with the mouse.
"if has('mouse')
" set mouse=r
"endif

ou

" In many terminal emulators the mouse works just fine.  By enabling it you
" can position the cursor, Visually select and scroll with the mouse.
" Only xterm can grab the mouse events when using the shift key, for other
" terminals use ":", select text and press Esc.
"if has('mouse')
"  if &term =~ 'xterm'
"    set mouse=a
"  else
"    set mouse=nvi
"  endif
"endif

Previous PostNext Post