Sublime Forum

Minimap ideas

#1

I notice other’s asking for improvements on the minimap, but I’m not sure if I should amend those posts or create my own. I’m just going to create my own.

First, the minimap could be used to scroll left to right. This would be awesome for people that only have a up/down scroll wheel (like myself). How could this work? Well, I think this is ultimately up to the developer(s) of ST. However, my suggestion is that you make a sort of scrubbing effect as you drag right to left from were you clicked in the minimap.

Second, improve initial click position.

Here’s the problem: Sense large file have large minimaps, the minimaps overflow at the bottom and top, and sense they overflow, they must scroll up as the shaded viewport scrolls down (the overlay that represent the current viewport). This create the problem that when initially click on the minimap you might not get the exact viewport destination you were expecting; the larger the text file the more the overflow, the more this problem is illustrated. (Please let me know if I explained the problem clearly)

The solution: The initial click position on the minimap will move the viewport immediately centered on the position in the minimap. But doing this alone will create another problem; the scrolling will become “off” and you wont be able to scroll from the initial position to any other position in the minimap. To fix this, you need a new algorithm that will gradually align the scrolling back to the scroll-to-pixel cardinality. I’m not exactly sure how to write this algorithm yet, but maybe if someone could post the currently used algorithm, I could modify it from there.

These are my two suggestions. I’d love to get some feedback on this asap.

PS: I <3 ST

0 Likes

#2

Request on the userecho site:
http://sublimetext.userecho.com/topic/27765-implement-minimap-clicktoscroll-option-to-allow-jumping-to-text-rather-than-position/

I posted about it here before with a GIF a while back:
https://forum.sublimetext.com/t/file-change-detection/21/1#p11224

More comments by others here:
https://forum.sublimetext.com/t/minimap-scroll-behavior-has-some-issues/2866/1

I believe this is what you are talking about. It’s the last thing I really miss from ST1. With the current behavior (when the contents don’t fit) the minimap is really just like a second scroll bar, and it doesn’t matter that you can see the file contents.

Seconded. :smiley:

0 Likes

#3

I’m glad to see that others have noticed this issue too.

I suggest a click-to-scroll behavior, but as you drag your mouse cursor around, not only does the transparent viewport representation follow your cursor, but the minimap’s background starts to scroll too. This will gradually align itself with the pixel-to-scroll behavior that is currently in place. I’m not sure on the algorithm off the top of my head for this, but I’m certain it can be done.

0 Likes