Mitch Goudy
Mitch Goudy

Reputation: 815

How to make VS Code minimap always highlight my screen location?

I was really excited to see VS Code finally added a minimap option for easier navigation. However, I've been really frustrated that the translucent rectangle showing your current location in a file only shows up when you hover over the minimap. A visual example of what I mean:

Without cursor: Without cursor With cursor: With cursor

When using this feature in other editors, I find a lot of value comes from quickly seeing where I am in a file. Does anyone know if there is a setting/extension/hack that will keep the rectangle visible?

Upvotes: 54

Views: 9159

Answers (5)

Mark
Mark

Reputation: 181639

Also see https://stackoverflow.com/a/78195302/836330 to add header text into your minimap like

minimap section headers


Of interest to some may be that v1.43 added three new colorCustomizations that affect the minimap slider color, including opacity (last two digits in the settings:

"workbench.colorCustomizations": {

  "minimapSlider.background": "#ff000060",
  "minimapSlider.hoverBackground": "#ff0000",
  "minimapSlider.activeBackground": "#2f00ff50"
}

See https://github.com/microsoft/vscode/pull/90631 and https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_43.md#minimap-background-and-slider-colors

Upvotes: 11

pclinux
pclinux

Reputation: 169

Use: "editor.minimap.showSlider":"always",

in the user setting fiel - settings.json file

Upvotes: 0

Alex
Alex

Reputation: 67639

From the stable version 1.14 (June 2017) there is an option in settings.json:

"editor.minimap.showSlider": "always"

Upvotes: 76

Hellonearthis
Hellonearthis

Reputation: 1762

I can't see a way to do it without building VS Code from source as it's just a small change to the minimap.css file of setting the opacity: 0; to opacity: 1;

.monaco-editor .minimap-slider {
    opacity: 0;
    transition: opacity 100ms linear;
}

I can't override the default css from the user settings with "editor.minimap-slider.opacity": 1,

But I am a noob at this kind of hack.

Upvotes: 0

Bill_Stewart
Bill_Stewart

Reputation: 24575

It appears this is already being tracked in a feature request:

https://github.com/Microsoft/vscode/issues/21784

Upvotes: 3

Related Questions