Sublime Forum

Hide minimap for certain filetypes?

#1

i’ve searched the forum, googled a lot, but haven’t found an answer.

as title says, i would like to hide the minimap when working on certain file types.

i’ve tried things like
"hide_minimap": true, "show_minimap": false,
in the syntax specific settings, but they don’t work.

i know i can manually use ‘view > hide minimap’ from the menubar, but can i automate this in any way?

thanks in advance

3 Likes

#2
3 Likes

#3

You can add a shortcut (ctrl+k, ctrl+m for example), but you can also create your own plugin!

But, because I’m in a good mood, I’ve created if for you :smile:

Just add the settings show_minimap where ever you want, and it’ll work. The pb is that because it is a window command, if you have a file that should have the minimap hidden, and an other shown, when you’ll focus the first one, all the minimap will be hidden, but when you focus the second, all the minimap will be shown. It’s not that much of a big deal, but I just wanted you to be aware of it.

Matt

2 Likes

How do I hide the minimap by default in ST3?
#4

thanks a bunch, @math2001

i’ll try that later when i get back home :slight_smile:

0 Likes

#5

it doesn’t seem to be working, or i’m doing something wrong (or both)…

i’ve saved your full code from the gist as minimap_setting.py in Packages/User

and added "show_minimap": false to the relevant .sublime-settings file for a particular syntax, .todo in my case

But the minimap is still there when i open a .todo file

0 Likes

#6

I know! It’s because of the from sublimetools import *.

Just open the file minimap_settings.py and remove this line (from sublimetools import *)

Sorry, it causes problem to everybody, I’m stupid.

It should work now, i’ll update the gist later, I can’t right now.

i’ve updated the gist (and my previous message)

Matt

1 Like

#7

yep, that fixed it!

great! :slight_smile: thanks again

1 Like

#8

Sorry to necro this post, but I submitted that Gist as a package:

0 Likes

#9

It’s live!
https://packagecontrol.io/packages/Remember%20Minimap%20Setting

0 Likes