Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Center Sublime Text 2 on current line when changing
import sublime_plugin
class AlwaysCenterCommand(sublime_plugin.EventListener):
def on_modified(self, view):
sel = view.sel()
region = sel[0] if len(sel) == 1 else None
if region != None:
view.show_at_center(region)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.