Created
March 11, 2014 19:38
-
-
Save firstclown/9493410 to your computer and use it in GitHub Desktop.
Keep view centered on caret (a la Scrivener) when in distraction free mode. Needs the awesome FullScreenStatus plugin.
This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import sublime | |
import sublime_plugin | |
class KeepCentered(sublime_plugin.EventListener): | |
def on_modified_async(self, view): | |
if sublime.active_window().settings().get('fss_on_distraction_free'): | |
view.show_at_center(view.sel()[0].begin()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment