1

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?

enter image description here

4

1 回答 1

0

我猜这不是 vim 问题,而是 cygwin 问题。当您右键单击它时,它正在粘贴,对于 vim,就像您在剪贴板中输入任何内容一样。

1)右键单击cygwin,选择选项(又名首选项或设置)

2)在左侧菜单中选择鼠标,然后选择粘贴以外的其他内容

对于滚轮问题...以及鼠标滚轮事件编码如下:

排队^[Oa

下线^[Ob

向上翻页 ^[[1;2a

向下翻页 ^[[1;2b

所以你需要映射那些什么都不做:

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> 
于 2014-07-11T18:35:20.533 回答