Last active
July 29, 2024 22:07
-
-
Save blunket/e041565ef50b925ea68f29eb495e4433 to your computer and use it in GitHub Desktop.
Sublime Text 3 - Toggle Vintage Mode 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
import sublime | |
class ToggleVintageCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
settings = sublime.load_settings('Preferences.sublime-settings') | |
ignored = settings.get("ignored_packages") | |
if "Vintage" in ignored: | |
ignored.remove("Vintage") | |
else: | |
ignored.append("Vintage") | |
settings.set("ignored_packages", ignored) |
correction
- Save this file in your Packages/User folder . === Save this file in your Package/ToggleVintageCommand
- Add this key binding in Preferences->Key Bindings:
{ "keys": ["ctrl+alt+v"], "command": "toggle_vintage" }Change ctrl+alt+v to whatever key binding you want.
Don't what happened now but this thing worked only when I placed the file in folder name ToggleVintageCommand.
this needs import sublime_plugin
at the top of the script
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change ctrl+alt+v to whatever key binding you want.