Skip to content

Instantly share code, notes, and snippets.

@blunket
Last active February 20, 2025 11:33
Show Gist options
  • Save blunket/e041565ef50b925ea68f29eb495e4433 to your computer and use it in GitHub Desktop.
Save blunket/e041565ef50b925ea68f29eb495e4433 to your computer and use it in GitHub Desktop.
Sublime Text 3 - Toggle Vintage Mode Plugin
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)
@blunket
Copy link
Author

blunket commented May 11, 2018

  1. Save this file in your Packages/User folder.
  2. 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.

@tusqasi
Copy link

tusqasi commented May 21, 2020

correction

  1. Save this file in your Packages/User folder . === Save this file in your Package/ToggleVintageCommand
  2. 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.

@azye
Copy link

azye commented Mar 18, 2021

this needs import sublime_plugin at the top of the script

@johnmapeson
Copy link

johnmapeson commented Feb 20, 2025

Hi, Andrew! Which operating system you run Sublime Text on? The plugin has a strange bug on macOS, I cannot figure out why it happens. If I simply start Sublime Text without any tabs and press Control-Option-V twice, Sublime Text successfully turns Vintage on, but then refuses to turn it off. Here is my discussion with OdatNurd on Sublime Forum about this: https://forum.sublimetext.com/t/toggle-vintage-package/75477/5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment