Created
September 8, 2023 15:36
-
-
Save amiralles/e975f39410324fea9bc0ee4e44550b46 to your computer and use it in GitHub Desktop.
Change View Font Size plugin for ST4
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 | |
import sublime_plugin | |
class ChangeViewFontSizeCommand(sublime_plugin.TextCommand): | |
def run(self, edit, by): | |
settings = self.view.settings() | |
settings.set("font_size", settings.get("font_size") + by) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This command will help you if you are working on a multimonitor setup with different resolutions.
Sadly, ST doesn't support setting different font sizes for different windows, so this is a nice trick to overcome that limitation.
Once you install this plugin, add these settings to your keybindings file so that you can zoom in and out on a per-view basis:
(Changes on the current view won't affect any other view or ST windows.)
Full credit to this fine gentleman: https://forum.sublimetext.com/t/different-font-sizes-for-different-windows/36359/3?u=amiralles