How to disable scroll wheel in Vim
You need to map the various scroll wheel events to <nop>
:
:nmap <ScrollWheelUp> <nop>
:nmap <S-ScrollWheelUp> <nop>
:nmap <C-ScrollWheelUp> <nop>
:nmap <ScrollWheelDown> <nop>
:nmap <S-ScrollWheelDown> <nop>
:nmap <C-ScrollWheelDown> <nop>
:nmap <ScrollWheelLeft> <nop>
:nmap <S-ScrollWheelLeft> <nop>
:nmap <C-ScrollWheelLeft> <nop>
:nmap <ScrollWheelRight> <nop>
:nmap <S-ScrollWheelRight> <nop>
:nmap <C-ScrollWheelRight> <nop>
Then copy and paste those lines and change "nmap" to "imap", and then do it again for "vmap".
See:
:help scroll-mouse-wheel
:help <nop>
And if you are unfamiliar with mappings:
:help map.txt
You can unmap these,
:map <ScrollWheelUp> <C-Y>
:map <S-ScrollWheelUp> <C-U>
:map <ScrollWheelDown> <C-E>
:map <S-ScrollWheelDown> <C-D>
Ref: vimdoc Scrolling with a mouse wheel.
There should also be a single configuration, but I can't seem to locate it at this time.