Created
August 27, 2014 17:42
Center Sublime Text 2 on current line when changing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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