Skip to content

Toggling Vintageous

Ron Green edited this page Sep 5, 2015 · 1 revision

Command to Toggle Vintageous

Put this command in Packages/User/toggle_vintageous.py:

import sublime
import sublime_plugin


class ToggleVintageous(sublime_plugin.WindowCommand):
    def run(self):
        setts = sublime.load_settings('Preferences.sublime-settings')
        ignored = setts.get('ignored_packages')

        if 'Vintageous' in ignored:
            ignored.remove('Vintageous')
        else:
            ignored.append('Vintageous')

        setts.set('ignored_packages', ignored)
        sublime.save_settings('Preferences.sublime-settings')

Then create Packages/User/Default.sublime-commands and add this:

[
    { "caption": "Vintageous: Toggle", "command": "toggle_vintageous" }
]

This way, you'll be able to toggle Vintageous on and off easily from the Command Palette (Ctrl+Shift+P).

Clone this wiki locally