Sublime Forum

Focus follows cursor?

#1

Is it possible to have this functionality? I couldn’t find anything in the settings, or in the forum.

It is very useful when reversing the cursor selection by mouse (built-in), by keyboard (Select-Until plugin by xavi-), or when eyeballing (eyeball plugin by wuub). In each of these cases, the cursor jumps outside the screen, and there is no way to go where it is, unless I lose my selection.

thanks!

0 Likes

#2

focus.pretty_please(follow_cursor) :question:
:frowning:

0 Likes

#3

Are you saying you want the focus to follow the mouse cursor, or the insertion point? Doesn’t it follow the insertion point already?

0 Likes

#4

It’s only following the insertion point in some cases. It doesn’t in the cases I have mentioned in my post. In the built-in case, you select a region, by mouse, or by keyboard (but it must extend outside the screen), and then you click with the mouse anywhere in the selection. That reverses the cursor position. The focus doesn’t follow, the cursor is now outside of the screen.

0 Likes

#5

Oh, you’re saying that part of the selection is on screen put the actual insertion point at the end of it is off screen? Am I understanding that right?
As for clicking in a selection, for me that always removes the selection and then the insertion point is by definition on screen, because it’s placed where I just clicked.

0 Likes

#6

sorry, I meant, i hold shift and then leftclick !
and for the first one, yes, this is what I mean. When a selection extends outside the screen, and you reverse the position of the cursor, it should scroll to show the other end. In other words, the cursor should always be inside the screen.

The other built-in case where this happens is “expand selection to indentation”. If the selection is longer, you’re left with no cursor, and in the same position.

0 Likes

#7

If you have only one cursor use the menu:

Goto -> Scroll -> Scroll To Selection

If you want something that works for multi-cursor:
https://forum.sublimetext.com/t/navigateselections/8520/1

0 Likes

#8

thanks for this, but i want this to happen automatically, not by pressing a keybinding (is there a way I can combine this keybinding with the other actions, so that it fires at the end of the action?)

0 Likes

#9

I’ve been having viewport+cursor issues with sublime for over a year (going ignored to this day). There are cases when the cursor can leave the viewport and the viewport doesn’t follow it. Quite irksome.

0 Likes