Sublime Forum

Multi-lines indicator

#1

Hi everyone,

I’m a long time user of sublime and I love it. I recently changed my good old computer for a new one which has a touchpad that has a not really accurate palm detection. Sometimes, I accidentally select multiple lines at once that are out of sight. Then when I edit the code, I don’t realize that I’m actually editing multiple lines.

I think I would be nice to have the possibility to display a small indicator when multiple lines are selected. Something like a top-right small orange circle (with parameters for controlling size, color and location?). I checked out existing plugins and discussions and I didn’t found anything, so maybe I’m the only one concerned !

Thoughts?

0 Likes

#2

The status bar in the window switches from showing you the cursor’s line and column to the number of selections (cursors) in the buffer when there’s more than one.

I don’t think there’s much that a plugin could do to help in this sort of case; plugins can’t add additional UI elements, so it would be constrained to something like displaying additional text in the status bar when this happens. I suppose it could also swap the color scheme to one with a different background color when there are multiple selections, though that might be a bit of a performance hit since it would need to redraw a lot.

0 Likes

#3

yes, indeed, but I’ve to admit that I’m never looking at the bottom left text. That’s why I was thinking about something more visible

I suppose it could also swap the color scheme to one with a different background color when there are multiple selections

that’s possible solution indeed.

0 Likes

#4

As you said, the bottom left text is already displaying when multiple lines are selected and it’s not affecting performances? How hard it would be to turn the text orange?

0 Likes

#5

Sorry, I didn’t express that very clearly (I’m experiencing a pretty severe case of TooManyMeetingsBrain right now).

Plugins can’t style the status bar except to add additional text, so for the color scheme option what that would do is change the background color of the file that you were editing in cases where there is more than one cursor. Something along the lines of making it lighter/darker, tinted red or something else that gives you the “Danger Will Robinson” vibe.

Swapping the color scheme like that would require the whole tab to be re-displayed to take the new colors into account. That’s definitely going to take non-zero time, but I don’t know if it’s anything worth worrying about per se. However if you often have multiple cursors or you’re using something like a 4K display, it may possibly add up.

0 Likes

#6

Ahh ok, I see now ! Thanks for the very clear explanations.

So if I understand correctly, that’s not something that a plugin can bring without affecting performances. There’s no urge, I just wanted to put it on the table to see how feasible it would be. I’ll wait and see if others have the same issue and needs as I do.

Thank you again,

0 Likes