3

I use mouse wheel scroll on two panes. In order to focus one pane, I must first click to focus it, then scroll.

Is there a way to focus upon mouse moving? This is also known as Focus follow mouse in i3wm.

1

1 Answer 1

4

In GVim there are set mousefocus and set scrollfocus (only Windows GVim 8.1.2257 or later).

mousefocus automatically activates window so it gets both mouse and keyboard input; scrollfocus only allows scrolling window under mouse cursor without activating it.

For Neovim it seems to work out-of-the-box (as if set scrollfocus).

2
  • 2
    On Windows, you also need to :set scrollfocus, but this needs a relative recent Vim 8.1.2257 Jun 11, 2020 at 11:32
  • @ChristianBrabandt Not exactly. They both can be used independently. I'll update my answer.
    – Matt
    Jun 11, 2020 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.