Created
April 16, 2013 11:53
Revisions
-
Jason Long created this gist
Apr 16, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ // Copy this to your keybindings (Preferences > Key Bindings - User) // Change the keybinding, color schemes, and themes to your preferences { "keys": ["ctrl+1"], "command": "toggle_color_scheme", "args": { "light_color_scheme": "Packages/User/Espresso Soda.tmTheme", "dark_color_scheme": "Packages/User/Monokai Soda.tmTheme", "light_theme": "Soda Light.sublime-theme", "dark_theme": "Soda Dark.sublime-theme" } } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ # Copy this file to ~/Library/Application Support/Sublime Text 2/Packages/User/ import sublime, sublime_plugin class ToggleColorSchemeCommand(sublime_plugin.TextCommand): def run(self, edit, **args): light_scheme = args["light_color_scheme"] dark_scheme = args["dark_color_scheme"] light_theme = args["light_theme"] dark_theme = args["dark_theme"] settings = sublime.load_settings('Preferences.sublime-settings') current_scheme = settings.get('color_scheme') if current_scheme == light_scheme: settings.set('color_scheme', dark_scheme) settings.set('theme', dark_theme) else: settings.set('color_scheme', light_scheme) settings.set('theme', light_theme) sublime.save_settings('Preferences.sublime-settings')