As discussed here: SublimeText/Origami#95 (comment)
Last active
June 19, 2016 00:39
-
-
Save mkormendy/a32e61e95f7810409d36ca35f17aecc6 to your computer and use it in GitHub Desktop.
Sublime Text Plugin with preferences and bindings to toggle auto zoom (resize focused window) feature in the Sublime Text Origami panel management Package.
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
Show hidden characters
| [ | |
| { | |
| "keys": ["super+alt+`"], "command": "toggle_origami_auto_zoom", | |
| } | |
| ] |
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
| [ | |
| { | |
| "origami_auto_zoom_on_focus": 0.75, | |
| "origami_azf_pref": 0.75, | |
| } | |
| ] |
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 | |
| import sublime_plugin | |
| class ToggleOrigamiAutoZoomCommand(sublime_plugin.ApplicationCommand): | |
| def run(self): | |
| settings = sublime.load_settings("Preferences.sublime-settings") | |
| if settings.get("origami_auto_zoom_on_focus", False) != settings.get("origami_azf_pref", False): | |
| origami_auto_zoom_setting = settings.get("origami_azf_pref", False) | |
| else: | |
| origami_auto_zoom_setting = False | |
| settings.set("origami_auto_zoom_on_focus", origami_auto_zoom_setting) | |
| sublime.save_settings("Preferences.sublime-settings") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment