Last updated: Apr 6, 2024
Reading time·4 min
To hide or show the minimap in VS Code:
Ctrl
+ Shift
+ P
(or Command
+ Shift
+ P
on macOS).F1
to open the Command Palette.The View: Toggle Minimap action hides the minimap if it's already shown.
If the minimap is hidden, the action shows it.
Here is a short clip that demonstrates the process.
By default, the toggle minimap action is not bound. However, you can set a keyboard shortcut if you have to use it often.
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.You can also click on the plus icon to set a keyboard shortcut.
For example, I've set the toggle minimap action to Ctrl
+ F4
.
You can also hide or show the minimap globally, in your settings.json file:
Ctrl
+ Shift
+ P
(or Command
+ Shift
+ P
on macOS).F1
to open the Command Palette.Type user settings json.
Click on Preferences: Open User Settings (JSON)
editor.minimap.enabled
setting to true
or false
."editor.minimap.enabled": false,
When the setting is set to false
, the minimap is hidden.
When it is set to true
, the minimap is shown.
You can also hide or show the minimap for the specific project, in a local
settings.json
file:
In the root directory of your project, create a .vscode folder.
Create a settings.json
file in the .vscode
folder.
Add the following code to your settings.json
file.
{ "editor.minimap.enabled": false }
If you need to change the minimap position to the left or right:
Ctrl
+ Shift
+ P
(or Command
+ Shift
+ P
on macOS).F1
to open the Command Palette.You can also open the settings screen by pressing Ctrl
+ ,
on Windows and
Linux or Cmd
+ ,
on macOS.
Make sure the minimap is enabled to be able to see it displayed on the specified side.
You can search for the minimap enabled setting and check the checkbox to show the minimap.
If you need to change the minimap position to the left or right:
Ctrl
+ Shift
+ P
(or Command
+ Shift
+ P
on macOS).F1
to open the Command Palette.You can also open the settings screen by pressing Ctrl
+ ,
on Windows and
Linux or Cmd
+ ,
on macOS.
The possible values are:
proportional
- the minimap has the same size as the editor's contents and
scrolling is enabled.fill
- the minimap stretches or shrinks to fill the editor's height and
scrolling is disabled.fit
- the minimap shrinks as necessary to never be larger than the editor
and scrolling is disabled.Make sure the minimap is enabled to be able to see it displayed on the specified side.
You can search for the minimap enabled setting and check the checkbox to show the minimap.
If you need to view the other available minimap settings in VS Code:
Ctrl
+ Shift
+ P
(or Command
+ Shift
+ P
on macOS).F1
to open the Command Palette.You can also open the settings screen by pressing Ctrl
+ ,
on Windows and
Linux or Cmd
+ ,
on macOS.
Some of the other possible settings include:
minimap max columns - limit the width of the minimap to render at most a certain number of columns.
minimap render characters - render the actual characters on a line as opposed to color blocks.
minimap scale - the scale of the content that is drawn in the minimap (1, 2, 3).
minimap show slider - controls when the minimap slider is shown.
minimap side - controls the side where to render the minimap.
minimap size - controls the size of the minimap.
You can learn more about the related topics by checking out the following tutorials: