Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable VS Code minimap in Windowed mode?

I did the following in Visual Studio Code:

  1. settings.json => "editor.minimap.enabled": true
  2. Open 2ed files side by side (windowed mode)
  3. Minimap exists in both windows

This takes up too much room, but I still want to use the Minimap when I'm editing a single file in a single window. Is there a way to have the Minimap enabled for a single file, but disabled in side-by-side "Windowed" mode?

like image 644
cagmz Avatar asked Mar 23 '17 17:03

cagmz


People also ask

How do I hide the preview pane in VS Code?

Right click anywhere on the minimap and select "Scroll Bar Options...". On the right side of the dialog window that pops up, you will see a section named "Behavior" under which you should select the "Use bar mode for vertical scroll bar" option. Press the OK button. This will remove the minimap.


Video Answer


2 Answers

Toggle minimap command has been added since vscode 1.16. Hit command + shift + p and select View: Toggle Minimap.

like image 57
King Julien Avatar answered Sep 25 '22 06:09

King Julien


There is no way to do this in VS Code. Currently there is only the "editor.minimap.enabled": false setting which can be true or false and either always enables the minimap or always disables it.

Unfortunately, as shown in this issue, there is also no "toggleMinimap" command to assign to keybindings.

You might find this extension useful, though, as it can be used to create a toggle minimap command:

settings:

"settings.cycle": [     {         "setting": "editor.minimap.enabled"     } ] 

keybindings.json:

{     "key": "ctrl+shift+t",     "command": "settings.cycle.workbench.colorTheme",     "when": "" } 
like image 45
Llewey Avatar answered Sep 22 '22 06:09

Llewey