def run(self, edit): global EMAX_ENABLED EMAX_ENABLED = not EMAX_ENABLED # need to keep the binding to turn it back on! emax_build_keymaps.all_maps(not EMAX_ENABLED) update_status(self.view)
def run(self, edit): emax_build_keymaps.all_maps(not EMAX_ENABLED)
HIDDEN, PERSISTENT, #status_message ) REGION_VAR = 'emax_region_active' ENABLED_VAR = 'emax_enabled' """ Is emax currently enabled? """ EMAX_ENABLED = True """ Update the keymaps if this is the first time we've run. """ emax_build_keymaps.all_maps() def update_status(view): if EMAX_ENABLED: status = "[E-Max: ON (C-M-S-' to deactivate)]" else: status = "[E-Max: OFF (C-M-S-' to activate)]" view.set_status(' emax', status) class ToggleEmax(TextCommand): """ Not everybody likes Emacs. This command (bound to M-C-S-' by default, which is unused in Emacs) will
ENABLED_VAR = 'emax_enabled' """ Is emax currently enabled? """ EMAX_ENABLED = True """ Update the keymaps if this is the first time we've run. """ emax_build_keymaps.all_maps() def update_status(view): if EMAX_ENABLED: status = "[E-Max: ON (C-M-S-' to deactivate)]" else: status = "[E-Max: OFF (C-M-S-' to activate)]" view.set_status(' emax', status) class ToggleEmax(TextCommand): """ Not everybody likes Emacs.