Created
August 5, 2023 19:32
-
-
Save adamelliotfields/df1a5fc807bf75030e90373d624dd3b5 to your computer and use it in GitHub Desktop.
Sublime Text 4 Show/Hide Minimap Setting
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 | |
""" | |
Put this in your user packages: | |
``` | |
mv ~/Downloads/show_minimap_setting.py ~/Library/Application\ Support/Sublime\ Text/Packages/User | |
``` | |
Then add the setting to Preferences.sublime-settings: | |
``` | |
{ | |
"show_minimap": false | |
} | |
``` | |
I find you have to exit and restart Sublime to load the updated settings. | |
@see https://docs.sublimetext.io/guide/extensibility/plugins | |
@see https://forum.sublimetext.com/t/disable-minimap-preference/57770/4 | |
""" | |
class ShowMinimapSetting(sublime_plugin.EventListener): | |
def on_activated(self, view): | |
show_minimap = view.settings().get("show_minimap") | |
if isinstance(show_minimap, bool): | |
view.window().set_minimap_visible(show_minimap) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment