ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Scroll​Offset

by SublimeText ALL

No description provided

Details

  • 2015.03.04.02.36.40
  • github.​com
  • github.​com
  • 10 years ago
  • 5 hours ago
  • 14 years ago

Installs

  • Total 2K
  • Win 807
  • Mac 1K
  • Linux 368
Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30
Windows 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
01234Aug 13Aug 10Aug 7Aug 4Aug 1Jul 29Jul 26Jul 23Jul 20Jul 17Jul 14Jul 11Jul 8Jul 5Jul 2Aug 13 Linux: 0 Mac: 0 Windows: 2Aug 12 Linux: 0 Mac: 0 Windows: 0Aug 11 Linux: 0 Mac: 0 Windows: 0Aug 10 Linux: 0 Mac: 0 Windows: 0Aug 9 Linux: 0 Mac: 0 Windows: 0Aug 8 Linux: 0 Mac: 0 Windows: 0Aug 7 Linux: 0 Mac: 0 Windows: 0Aug 6 Linux: 0 Mac: 0 Windows: 0Aug 5 Linux: 0 Mac: 0 Windows: 0Aug 4 Linux: 0 Mac: 0 Windows: 0Aug 3 Linux: 0 Mac: 0 Windows: 0Aug 2 Linux: 0 Mac: 0 Windows: 0Aug 1 Linux: 0 Mac: 0 Windows: 0Jul 31 Linux: 0 Mac: 0 Windows: 0Jul 30 Linux: 0 Mac: 0 Windows: 0Jul 29 Linux: 0 Mac: 0 Windows: 0Jul 28 Linux: 0 Mac: 0 Windows: 0Jul 27 Linux: 0 Mac: 0 Windows: 0Jul 26 Linux: 0 Mac: 0 Windows: 0Jul 25 Linux: 0 Mac: 0 Windows: 0Jul 24 Linux: 0 Mac: 0 Windows: 2Jul 23 Linux: 0 Mac: 0 Windows: 0Jul 22 Linux: 0 Mac: 0 Windows: 1Jul 21 Linux: 0 Mac: 0 Windows: 1Jul 20 Linux: 0 Mac: 0 Windows: 0Jul 19 Linux: 0 Mac: 0 Windows: 0Jul 18 Linux: 0 Mac: 1 Windows: 0Jul 17 Linux: 0 Mac: 0 Windows: 0Jul 16 Linux: 0 Mac: 0 Windows: 0Jul 15 Linux: 0 Mac: 0 Windows: 0Jul 14 Linux: 0 Mac: 0 Windows: 0Jul 13 Linux: 0 Mac: 0 Windows: 0Jul 12 Linux: 0 Mac: 0 Windows: 0Jul 11 Linux: 1 Mac: 0 Windows: 1Jul 10 Linux: 0 Mac: 0 Windows: 0Jul 9 Linux: 1 Mac: 0 Windows: 0Jul 8 Linux: 0 Mac: 0 Windows: 0Jul 7 Linux: 0 Mac: 0 Windows: 0Jul 6 Linux: 0 Mac: 0 Windows: 0Jul 5 Linux: 0 Mac: 0 Windows: 0Jul 4 Linux: 0 Mac: 0 Windows: 0Jul 3 Linux: 0 Mac: 0 Windows: 0Jul 2 Linux: 0 Mac: 0 Windows: 0Jul 1 Linux: 0 Mac: 0 Windows: 0Jun 30 Linux: 0 Mac: 0 Windows: 0Aug 13 Linux: 0 Mac: 0 Windows: 2Aug 12 Linux: 0 Mac: 0 Windows: 0Aug 11 Linux: 0 Mac: 0 Windows: 0Aug 10 Linux: 0 Mac: 0 Windows: 0Aug 9 Linux: 0 Mac: 0 Windows: 0Aug 8 Linux: 0 Mac: 0 Windows: 0Aug 7 Linux: 0 Mac: 0 Windows: 0Aug 6 Linux: 0 Mac: 0 Windows: 0Aug 5 Linux: 0 Mac: 0 Windows: 0Aug 4 Linux: 0 Mac: 0 Windows: 0Aug 3 Linux: 0 Mac: 0 Windows: 0Aug 2 Linux: 0 Mac: 0 Windows: 0Aug 1 Linux: 0 Mac: 0 Windows: 0Jul 31 Linux: 0 Mac: 0 Windows: 0Jul 30 Linux: 0 Mac: 0 Windows: 0Jul 29 Linux: 0 Mac: 0 Windows: 0Jul 28 Linux: 0 Mac: 0 Windows: 0Jul 27 Linux: 0 Mac: 0 Windows: 0Jul 26 Linux: 0 Mac: 0 Windows: 0Jul 25 Linux: 0 Mac: 0 Windows: 0Jul 24 Linux: 0 Mac: 0 Windows: 2Jul 23 Linux: 0 Mac: 0 Windows: 0Jul 22 Linux: 0 Mac: 0 Windows: 1Jul 21 Linux: 0 Mac: 0 Windows: 1Jul 20 Linux: 0 Mac: 0 Windows: 0Jul 19 Linux: 0 Mac: 0 Windows: 0Jul 18 Linux: 0 Mac: 1 Windows: 0Jul 17 Linux: 0 Mac: 0 Windows: 0Jul 16 Linux: 0 Mac: 0 Windows: 0Jul 15 Linux: 0 Mac: 0 Windows: 0Jul 14 Linux: 0 Mac: 0 Windows: 0Jul 13 Linux: 0 Mac: 0 Windows: 0Jul 12 Linux: 0 Mac: 0 Windows: 0Jul 11 Linux: 1 Mac: 0 Windows: 1Jul 10 Linux: 0 Mac: 0 Windows: 0Jul 9 Linux: 1 Mac: 0 Windows: 0Jul 8 Linux: 0 Mac: 0 Windows: 0Jul 7 Linux: 0 Mac: 0 Windows: 0Jul 6 Linux: 0 Mac: 0 Windows: 0Jul 5 Linux: 0 Mac: 0 Windows: 0Jul 4 Linux: 0 Mac: 0 Windows: 0Jul 3 Linux: 0 Mac: 0 Windows: 0Jul 2 Linux: 0 Mac: 0 Windows: 0Jul 1 Linux: 0 Mac: 0 Windows: 0Jun 30 Linux: 0 Mac: 0 Windows: 0Aug 13 Linux: 0 Mac: 0 Windows: 2Aug 12 Linux: 0 Mac: 0 Windows: 0Aug 11 Linux: 0 Mac: 0 Windows: 0Aug 10 Linux: 0 Mac: 0 Windows: 0Aug 9 Linux: 0 Mac: 0 Windows: 0Aug 8 Linux: 0 Mac: 0 Windows: 0Aug 7 Linux: 0 Mac: 0 Windows: 0Aug 6 Linux: 0 Mac: 0 Windows: 0Aug 5 Linux: 0 Mac: 0 Windows: 0Aug 4 Linux: 0 Mac: 0 Windows: 0Aug 3 Linux: 0 Mac: 0 Windows: 0Aug 2 Linux: 0 Mac: 0 Windows: 0Aug 1 Linux: 0 Mac: 0 Windows: 0Jul 31 Linux: 0 Mac: 0 Windows: 0Jul 30 Linux: 0 Mac: 0 Windows: 0Jul 29 Linux: 0 Mac: 0 Windows: 0Jul 28 Linux: 0 Mac: 0 Windows: 0Jul 27 Linux: 0 Mac: 0 Windows: 0Jul 26 Linux: 0 Mac: 0 Windows: 0Jul 25 Linux: 0 Mac: 0 Windows: 0Jul 24 Linux: 0 Mac: 0 Windows: 2Jul 23 Linux: 0 Mac: 0 Windows: 0Jul 22 Linux: 0 Mac: 0 Windows: 1Jul 21 Linux: 0 Mac: 0 Windows: 1Jul 20 Linux: 0 Mac: 0 Windows: 0Jul 19 Linux: 0 Mac: 0 Windows: 0Jul 18 Linux: 0 Mac: 1 Windows: 0Jul 17 Linux: 0 Mac: 0 Windows: 0Jul 16 Linux: 0 Mac: 0 Windows: 0Jul 15 Linux: 0 Mac: 0 Windows: 0Jul 14 Linux: 0 Mac: 0 Windows: 0Jul 13 Linux: 0 Mac: 0 Windows: 0Jul 12 Linux: 0 Mac: 0 Windows: 0Jul 11 Linux: 1 Mac: 0 Windows: 1Jul 10 Linux: 0 Mac: 0 Windows: 0Jul 9 Linux: 1 Mac: 0 Windows: 0Jul 8 Linux: 0 Mac: 0 Windows: 0Jul 7 Linux: 0 Mac: 0 Windows: 0Jul 6 Linux: 0 Mac: 0 Windows: 0Jul 5 Linux: 0 Mac: 0 Windows: 0Jul 4 Linux: 0 Mac: 0 Windows: 0Jul 3 Linux: 0 Mac: 0 Windows: 0Jul 2 Linux: 0 Mac: 0 Windows: 0Jul 1 Linux: 0 Mac: 0 Windows: 0Jun 30 Linux: 0 Mac: 0 Windows: 0

Readme

Source
raw.​githubusercontent.​com

ScrollOffset

ScrollOffset automatically scrolls the buffer when the insertion point gets near the edge, similar to how vim's scrolloff works. ScrollOffset works with multiple selections, and you can change how far from the edge you'd like to stay.

This Plugin is implemented using Layout-Coordinates, so it also works when you have word_wrap enabled.

When you use multiple selections which do not fit into the viewport, Sublimes default behviour is used. This might change in future versions - you find a TODO in the code where to add the logic for such behaviour.

Ignoring Mouse Input

ScrollOffset runs whenever the selection changes. If you would like to ignore mouse input for ScrollOffset purposes, you must also install MouseEventListener. Once MouseEventListener is installed, ScrollOffset will automatically start ignoring mouse input.

However, selecting more than the viewport can display still feels a bit awkward. Since Sublime does not offer a possibility to detect mouse dragging, one can not implement Sublimes default behaviour when it comes to those kind of selections. Just try it out whether it's a hassle for you.

Install

This plugin is available through Package Control, which is available here:

http://wbond.net/sublime_packages/package_control

As mentioned above, installing MouseEventListener is good idea.

Manual Install

Go to your Packages subdirectory under ST2's data directory:

  • Windows: %APPDATA%\Sublime Text 2
  • OS X: ~/Library/Application Support/Sublime Text 2
  • Linux: ~/.config/sublime-text-2
  • Portable Installation: Sublime Text 2/Data

Then clone this repository:

git clone git://github.com/Wolff09/ScrollOffset.git

That's it!