mkormendy
6/19/2016 - 12:30 AM

Sublime Text Plugin with preferences and bindings to toggle auto zoom (resize focused window) feature in the Sublime Text Origami panel mana

Sublime Text Plugin with preferences and bindings to toggle auto zoom (resize focused window) feature in the Sublime Text Origami panel management Package.

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")
[
  {
    "origami_auto_zoom_on_focus": 0.75,
    "origami_azf_pref": 0.75,
  }
]
[
  {
    "keys": ["super+alt+`"], "command": "toggle_origami_auto_zoom",
  }
]