如何禁用 VS 代码小地图在窗口模式?

我在 VisualStudio 代码中执行了以下操作:

  1. Setings.json = > “ edit or.miniap.abled”: true
  2. 并排打开2ed 文件(窗口模式)
  3. 这两个窗口都存在极小地图

这占用了太多的空间,但是当我在一个窗口中编辑一个文件时,我仍然想使用 Minimap。是否有一种方法可以为单个文件启用毫发地图,但在并排“窗口”模式下禁用?

44705 次浏览

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": ""
}

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

Simplest way is go to: View -> Toggle Minimap

Update:

In newer versions: View -> Show Minimap

1) Go to File -> Preferences -> Keyboard Shortcuts 2) type in "View: minimap" 3) right click and add a key binding. I like to use ctrl+m ("m" for minimap)

If there are existing key bindings, you can use another one, or click the existing one(s) listed, then right click them and remove the binding before repeating steps 2 and 3 above.

New option available, View-> Show minimap (uncheck)

In Visual Studio Code Version 1.41.1. Go to

Files >> Preferences >> Settings

Select

Text Editor >> Minimap >> Uncheck Enabled checkbox

I didnt find "minimap", instead I found:

[Options]>>[Text Editor]>>[All Languages]>>[Scroll Bars]>>Behavior>>"Use map mode for vertical scroll bar"

I am not able to embed image yet, check link

To remove/disable/hide VS Code Minimap,
Go to the View tab and uncheck this: View > Show Minimap

remove/disable/hide VS Code Minimap