I'm using Vim under babun (cygwin). What really annoys me are the problems with mouse. I want to completly disable it. I tried to add to my vimrc everything that I found on net, but nothing works.
Take a look at this little presentation. There you can see all my defined settings and what is still wrong. I have no problem with the left mouse button. This one does nothing. Problem is with right button and even more problem is with the scroll. The scroll adds additional characters what you can see at this gif. Right button add new empty line or pastes something. How to get rid of this all?
I am guessing this is not a vim issue, but a cygwin issue. When you right click it is pasting, to vim it is just like you are typing whatever is in your clipboard.
1) Right click in cygwin, choose options (aka preferences or settings)
2) Select mouse in the left menu, and select something other than paste
For the scrollwheel issue... well mousewheel events are encoded as follows:
line up ^[Oa
line down ^[Ob
page up ^[[1;2a
page down ^[[1;2b
So you would need to map those to do nothing:
map <Esc>Oa <Nop>
map <Esc>Ob <Nop>
map <Esc>[1;2a <Nop>
map <Esc>[1;2b <Nop>
map! <Esc>Oa <Nop>
map! <Esc>Ob <Nop>
map! <Esc>[1;2a <Nop>
map! <Esc>[1;2b <Nop>