Sublime Forum

Scroll Offset

#1

Hey guys I made a new plugin—it makes it so the view scrolls before the cursor gets to the edge. Check it out:
github.com/adzenith/Sublime-plu … _offset.py
(theoretically this link should always point to the most recent version)

The only known bug is that it’s hard to use to the mouse to select things near the edge of the screen. I was kind of thinking of ways to fix this but I haven’t come up with anything simple.

Let me know if you’ve got any questions or have any problems.

0 Likes

#2

Hmm… I’ve done a different approach to this some days ago:
bitbucket.org/theblacklion/subl … _offset.py

But I haven’t made any attempt for centering the view horizontally. Do you use/need that?

0 Likes

#3

It comes in handy to have it scroll horizontally too. I edit files that have long lines, and it’s helpful to have a horizontal scroll offset.

0 Likes

#4

Hi folks!

Is there a reason I do not see any effects using it with ST2?

0 Likes

#5

I’ve heard tell it doesn’t work if you have word wrap enabled.

0 Likes

#6

Updated link to package: github.com/SublimeText/ScrollOffset

0 Likes

#7

Even after disabling word wrap, installing Scroll Offset and Mouse Event Listener and restarting ST2, I can’t see difference when scrolling. The cursor always hits the last line (top / bottom) before it scrolls…

0 Likes

#8

Huh. Does your console say anything?

0 Likes

#9

There aren’t any entries in the console (from either of these two plugins) when I actually scroll and apart from that, after starting up ST2, only the usual entries that they have been loaded.

E.g.:
Reloading plugin D:\Tools\Sublime Text\Data\Packages\MouseEventListener\mouse_event_listener.py
Reloading plugin D:\Tools\Sublime Text\Data\Packages\ScrollOffset\scroll_offset.py

0 Likes

#10

Huh… not sure what else to check. It definitely works over here.
Try adding “show_debug_guides”: True to your Scroll Offset.sublime-settings?

0 Likes

#11

Changed it from false to true and restarted ST2 (just in case). No debug entries in the console ;/

0 Likes

#12

[quote=“adzenith”]Huh… not sure what else to check. It definitely works over here.
Try adding “show_debug_guides”: True to your Scroll Offset.sublime-settings?[/quote]

this is wierd, the plugin works, but only with ONE of my python files.

0 Likes

#13

[quote=“highend”]

Changed it from false to true and restarted ST2 (just in case). No debug entries in the console ;/[/quote]

show_debug_guides

0 Likes