What do I need to put inside my user preferences file to hide the minimap by default?
I’m on macOS using Build 3126, the "show_minimap": false,
option didn’t work for me.
What do I need to put inside my user preferences file to hide the minimap by default?
I’m on macOS using Build 3126, the "show_minimap": false,
option didn’t work for me.
I don’t think there is an option to turn the minimap on and off via a configuration option. As far as I’m aware the minimap status in a new window follows the status of the current window at the time that a new window is created. So if you have it turned on and create a new window, the new window has it as well, and vice versa.
The only exception to this is that the state of the minimap in distraction free mode persists, and Sublime will turn the minimap on or off as needed as you enter and leave that mode to keep things how they last were. This might be where the show_minimap
setting comes into play, because it appears in the session file.
Note that I say this based purely on the lack of a documented option and my own observations.
Assuming you sometimes want it turned on on a window by window basis but in general want it off unless you toggle it, a plugin such as the following may get you there. It catches the creation of a new window based on the new_window
command having been executed and turns off the minimap if it is turned on in the new window.
I’m not sure that this covers 100% of all possible ways for a new window to be opened, but it seems to work if you manually create the window via keyboard/menu or from the command line with something like subl -n
.
import sublime
import sublime_plugin
class MinimapEventListener(sublime_plugin.EventListener):
def on_post_window_command(self, window, command, args):
if command == "new_window":
new_window = sublime.active_window()
if new_window.is_minimap_visible():
new_window.set_minimap_visible(False)