4wk_
4wk_

Reputation: 2743

VIm : How to use only the "mouse scrolling" without the other feature of :set mouse=a

I just discovered :set mouse=a. Amazing thing, it allows my coworkers to scroll over my openend files.

But here is the thing : I really don't want the cursor to move when I left-click somewhere. I don't want either the standard cursor which :set mouse=a brings (I want to keep the default text cursor).

In others words : is there a way to enable mouse scrolling in VIm without enable other support mouse stuff ?

Thanks.

EDIT - other idea : can I bind the wheel mouse UP to do the same thing that Page Up key ? It would be awesome !

Upvotes: 5

Views: 2253

Answers (1)

kev
kev

Reputation: 161954

Try this mapping:

:nnoremap <LeftMouse> <nop>

Upvotes: 2

Related Questions