Skip to content

Instantly share code, notes, and snippets.

@math2001
Last active August 14, 2021 17:34
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save math2001/ca8f71e38ad12ff157b34d5425d50ec7 to your computer and use it in GitHub Desktop.
Save math2001/ca8f71e38ad12ff157b34d5425d50ec7 to your computer and use it in GitHub Desktop.
A plugin to hide the minimap using a setting on sublime text.
# -*- encoding: utf-8 -*-
import sublime
import sublime_plugin
class MinimapSetting(sublime_plugin.EventListener):
def on_activated(self, view):
show_minimap = view.settings().get('show_minimap')
if show_minimap:
view.window().set_minimap_visible(True)
elif show_minimap is not None:
view.window().set_minimap_visible(False)
@math2001
Copy link
Author

The problem is that because hiding/showing the minimap is a window command, it affects every file in the window.

@evandrocoan
Copy link

Thanks for sharing!

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