Friday, January 24, 2014

Re: How to disable mouse scroll wheel when in insert mode?

On 18:46 Fri 24 Jan , Glenn Todd Miller wrote:
> Long time vim user looking for some advice on this, tried searching the
> web to no avail. I am using CentOS 6 and vim 7.2.411.
>
> My issue: In vim, I am in INSERT mode, my cursor is where I want it to be
> for a PASTE operation, but when I press the middle mouse button (which in
> my case is a scroll wheel) to do the paste the wheel moves inadvertently
> and I end up pasting somewhere else, not in the place where my cursor
> was when I entered INSERT mode.
>
> Is there a way to configure vim so that the mouse scroll wheel/middle
> mouse button is disabled when in INSERT mode?
>
> Outside of insert mode the mouse scroll is a great feature, so I only
> want to disable it when in insert mode.
> Thanks for any help,
>
>
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


I don't think that you can disable the mouse wheel. But you can use
^r in insert mode to paste from various registers, e.g. from clipboard.
Read more in :help i^r

Best regards,
Marcin Szamotulski

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: