Last active
November 4, 2016 14:47
-
-
Save Glaived/f6da9ae2390dfe10522692a18b5e24ad to your computer and use it in GitHub Desktop.
A simple package that lets you toggle between two font size
This file contains hidden or 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
Show hidden characters
[ | |
/* You can add shortcut : example for Windows */ | |
{ "keys": ["ctrl+alt+shift+keypad_plus"], "command": "reset_font_size_to_user_defaults" } | |
/* ... */ | |
] |
This file contains hidden or 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
{ | |
"default_font_size": 9, | |
"font_size": 9, | |
"spectator_font_size": 12, | |
/* ... */ | |
} |
This file contains hidden or 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
# Fork from: http://larsnordeide.com/2013/improve-sublime-text-2-part-1.html | |
# Store the following command in a file reset_font_size_command.py in you User package folder. | |
import sublime | |
import sublime_plugin | |
class ResetFontSizeToUserDefaultsCommand(sublime_plugin.ApplicationCommand): | |
def run(self): | |
s = sublime.load_settings('Preferences.sublime-settings') | |
if s.has('default_font_size') & s.has('spectator_font_size'): | |
if s.get('font_size') == s.get('default_font_size'): | |
s.set('font_size', s.get('spectator_font_size')) | |
else: | |
s.set('font_size', s.get('default_font_size')) | |
sublime.save_settings('Preferences.sublime-settings') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment