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