Alex Rivera | Logout

Focus follow mouse in vim

Asked 2012-12-04T21:12:14.140
8

I am aware that the mousefocus option is only supposed to work in gVim. But I was wondering, if it's possible to have the console Vim switch to different windows in response to mouse clicks, would it be not possible to easily add following mouse movement to it, too?

I'm an xmonad user, I love the focus following the pointer feature, I do a lot of pdf viewing and browsing while writing in Vim, and I'd be so much happier if I didn't have to keep mentally switching back and forth between two different types of focus changing.

If that's completely not possible, I guess opening new Vim windows (as with :split) in new instances of the terminal is no easier to do?

Edit
Report

1 Answer

8
set mouse=a

should do the trick but it will probably depend on your terminal emulator. See :help 'mouse'.

answered 2012-12-04T21:23:34.167

Your Answer