Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling two-finger scrolling in Vim

While using Vim(v7.3.353-2 at the time of writing), it's frustrating and time-consuming if my palm accidentally touches the trackpad while resting my hands on the keyboard and causes a scroll in Vim that alters my cursor's position.

How to disable this behaviour?

like image 666
zeboidlund Avatar asked Jan 02 '12 14:01

zeboidlund


2 Answers

You can remap those bindings to a no-operation (see :help <scrollwheel:

noremap <ScrollWheelUp>      <nop>
noremap <S-ScrollWheelUp>    <nop>
noremap <C-ScrollWheelUp>    <nop>
noremap <ScrollWheelDown>    <nop>
noremap <S-ScrollWheelDown>  <nop>
noremap <C-ScrollWheelDown>  <nop>
noremap <ScrollWheelLeft>    <nop>
noremap <S-ScrollWheelLeft>  <nop>
noremap <C-ScrollWheelLeft>  <nop>
noremap <ScrollWheelRight>   <nop>
noremap <S-ScrollWheelRight> <nop>
noremap <C-ScrollWheelRight> <nop>
like image 190
Benoit Avatar answered Sep 30 '22 18:09

Benoit


I think this is a problem with your terminal program. I just tried yakuake and it looks like its some variant on KDE's konsole. There is an open bug on this:

https://bugs.kde.org/show_bug.cgi?id=170582

Perhaps naively, I hope that fixing this bug for konsole will also fix the behaviour for yakuake.

like image 44
John Schmitt Avatar answered Sep 30 '22 18:09

John Schmitt