Sublime Forum

New Option: Focus follows mouse

#1

Dear Sublime HQ,

May I suggest creating a new option to enable “focus follows mouse cursor”? This would be useful in multi column view, and a consistent UX when using with window managers that support it.

Many thanks!

1 Like

#2

Seconded.

My entire interface (Linux) works that way and I find it very useful to just move the mouse over a window and start typing. But ST panes require not just an extra click, but an accurate click, otherwise the cursor is moved.

In fact, I have not found a way to focus a view with the mouse, without moving the cursor.

0 Likes

#3

you mean, something like:

import sublime
import sublime_plugin


class FocusGroupOnHover(sublime_plugin.ViewEventListener):
    def on_hover(self, point, hover_zone):
        self.view.window().focus_view(self.view)
4 Likes

Highlight current document when mouse comes over
#4

Wish we could somehow make it more instant, but this is as best as we can get at this moment. Although the ViewEventListener isn’t really needed because we don’t persist any data for views and want to act on every view anyway.

There also seems to be some odd behavior with non-standard views such as the console. I haven’t investigated that enough, however.

0 Likes

#5

What about not using the mouse:

  • ctrl+1
  • ctrl+2
0 Likes

#6

It’s a matter of visual consistency for me. I use InactivePanes (as everyone should, imo) and a tiling wm that focuses windows on hovering, which is incredibly useful imo. The only issues is (or was, rather) that multiple ST panes would not follow this trend because they are obviously in the same window.

That said, it’s a very trivial matter ofc.

I have a custom binding on ctrl+1 to cycle between all panes, btw.

1 Like