How to Hide or Show the Minimap in Visual Studio Code

avatar
Borislav Hadzhiev

Last updated: Apr 6, 2024
4 min

banner

# How to Hide or Show the Minimap in Visual Studio Code

To hide or show the minimap in VS Code:

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type toggle minimap and select View: Toggle Minimap.

view toggle minimap

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.

hide show minimap

# Setting a keyboard shortcut to hide or show the minimap

By default, the toggle minimap action is not bound. However, you can set a keyboard shortcut if you have to use it often.

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type Keyboard Shortcuts and select Preferences: Open Keyboard Shortcuts.

preferences open keyboard shortcuts

  1. Type toggle minimap and set double click on the View: Toggle Minimap row.

set keyboard shortcut toggle minimap

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.

custom keyboard shortcut toggle minimap

# Hide or Show the minimap using a settings.json file

You can also hide or show the minimap globally, in your settings.json file:

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings json.

  2. Click on Preferences: Open User Settings (JSON)

preferences open user settings

  1. Set the editor.minimap.enabled setting to true or false.
settings.json
"editor.minimap.enabled": false,

hide show minimap in settings json

When the setting is set to false, the minimap is hidden.

When it is set to true, the minimap is shown.

# Hide or Show the minimap for the specific project

You can also hide or show the minimap for the specific project, in a local settings.json file:

  1. In the root directory of your project, create a .vscode folder.

  2. Create a settings.json file in the .vscode folder.

  3. Add the following code to your settings.json file.

.vscode/settings.json
{ "editor.minimap.enabled": false }

hide show minimap specific to project

# Change the minimap position in VS Code

If you need to change the minimap position to the left or right:

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings and select Preferences: Open User Settings.

open user settings

You can also open the settings screen by pressing Ctrl + , on Windows and Linux or Cmd + , on macOS.

  1. Type minimap side and select your preferred side.

select minimap side

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.

minimap enabled

# Change the size of the minimap in VS Code

If you need to change the minimap position to the left or right:

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings and select Preferences: Open User Settings.

open user settings

You can also open the settings screen by pressing Ctrl + , on Windows and Linux or Cmd + , on macOS.

  1. Type minimap size and set the size of the minimap widget.

minimap enabled

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.

minimap enabled

# Viewing other minimap settings in VS Code

If you need to view the other available minimap settings in VS Code:

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings and select Preferences: Open User Settings.

open user settings

You can also open the settings screen by pressing Ctrl + , on Windows and Linux or Cmd + , on macOS.

  1. Type minimap.

other minimap settings

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.

# Additional Resources

You can learn more about the related topics by checking out the following tutorials:

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.