246

I can't find any option, setting, or keyboard shortcut that disables or hides that annoying scrollbar. I just don't find it useful and it's distracting.

Can't just edit the editor's CSS like Atom, either.

Alexander Abakumov
  • 13,617
  • 16
  • 88
  • 129
user41997
  • 2,751
  • 2
  • 12
  • 12

16 Answers16

347

Remove Minimap

Add the following to your settings.json file

"editor.minimap.enabled": false

Note that, as pointed out in another answer, this process has now been simplified to:

View->Show Minimap

Remove the Overview Ruler

Add the following to your settings.json file

"editor.hideCursorInOverviewRuler": true

This will keep the scrollbar, but will result in it only appearing when the cursor is within the editor, as seen in the image below:

enter image description here

Completely remove scrollbars (requires restart)

If you would like to completely remove the scrollbars, add the following to your settings.json file (note the editor will say "Unknown configuration setting" - ignore this. It will still work):

"editor.scrollbar.horizontal": "hidden",
"editor.scrollbar.vertical": "hidden"

This will result in the scrollbars not being visible even when the cursor is in the editor, as seen in the image below:

enter image description here

badfilms
  • 4,317
  • 1
  • 18
  • 31
  • 24
    hmm. those "editor.scrollbar.*" entries give me "Unknown configuration setting" – Lokua Mar 11 '17 at 20:19
  • 8
    You need to restart vscode. It's an unoffical method to hid scroll bars that's why giving that error. [here](https://github.com/Microsoft/vscode/issues/35454) – T K Sourabh Jan 05 '18 at 11:31
  • To make these scrollbars appear to hide, you can use RGBA colouring for `scrollbarSlider` attributes in your `workbench.colorCustomizations` settings. For example, setting all of the attributes to `#000000`. – Florian Suess Feb 05 '19 at 03:43
  • 1
    On my system it's `view `-> `show minimap` Not sure if this was changed since then or if it's a difference between OS builds – Oztaco Mar 13 '20 at 15:57
  • For me, the "editor.scrollbar.vertical": "hidden" didnt work, but the horizontal did! – Brendan Metcalfe Jul 22 '20 at 03:54
174

Ctrl + Shift + P -> Open User Settings

"editor.minimap.enabled": false
Alexandru Marculescu
  • 5,569
  • 6
  • 34
  • 50
  • This should be the default setting. same for the the file preview that closes a file when you open a new one. thanks – Mehdi Sep 15 '20 at 13:19
58

Try this,

view->toggle minimap

or after version 1.43

view->show minimap

neouyghur
  • 1,577
  • 16
  • 31
20

Removing the scroll bar

These no longer work:

"editor.scrollbar.horizontal": "hidden",
"editor.scrollbar.vertical": "hidden"

However, this will set the size of the scroll bar to 0:

"editor.scrollbar.verticalScrollbarSize": 0,

The toolip says "Unknown Configuration Setting" but it works for me. (Visual Studio Code 1.39.2)

Pontus Holmbom
  • 329
  • 2
  • 4
  • As of 2022, there is a Setting: `Editor › Scrollbar: Vertical Scrollbar Size`. I set it to `0` (zero) and the entire scrollbar column was no longer visible. (Which is the result I wanted.) – mpb Aug 27 '22 at 00:27
11

So this is an unofficial method as instructed on accepted answer by @badfilms. You can read about it here

After adding, restart vscode: "editor.scrollbar.horizontal": "hidden", "editor.scrollbar.vertical": "hidden" This gives and "Unknown configuration settings", ignore it.

Then to remove the scrollbar seperator or ruler border, add this: "editor.overviewRulerBorder": false

T K Sourabh
  • 351
  • 2
  • 8
11

Goto View and deselect Minimap.

Disable Minimap in VSCode

insearchofcode
  • 438
  • 5
  • 9
6

tested Visual Studio version: VS Community 2017 Version 15.8.2

Tools --> Options

Search for "scroll"

click on "Text Editor" title from the results on the left side.

click "Use bar mode for vertical scroll bar" under "Behavior" section and then click "OK"

Here is a screenshot: Turn off Scroll Bar map mode

AntiqTech
  • 717
  • 1
  • 6
  • 10
5

You can toggle it from the top bar "View > Show Minimap", But you can also define it as a keyboard shortcut!

  1. Go to: "File > Preferences > Keyboard Shortcuts"

  2. Search: "Minimap"

  3. Select: "View: Toggle Minimap"

  4. Select the keyboard you wish to link (I used Ctrl+M)

Shlomi Aharoni
  • 482
  • 7
  • 9
  • Good suggestion to assign a keyboard shortcut to it, while working using split up screen minimap is not required as it takes up a lot of space. – ani627 Mar 30 '22 at 13:12
3

In Visual Studio 2019 Right click on the scroll bar and select "Scroll Bar Options" from the context menu. This will display the settings for the Scroll Bars.

Under the Behavior heading halfway down, select "Use bar mode for vertical scroll bar" then click Ok. This removed the map mode from the bar.

Norm B
  • 64
  • 4
  • 1
    this question is About vs-code not Studio 2019 – Ali Besharati Apr 30 '21 at 18:40
  • 1
    Considering this post helped me find a solution to question in regular VS, I figured it might help others who show up here. There are generally a lot of feature cross over between Microsoft programs, which means possible settings that also crossed over. – Norm B May 03 '21 at 12:37
  • To be fair, the question doesn't specify whether it's VS Code or Studio, unless it's been edited as of today, 03/16/2022. As I was looking for an answer on how to remove the scroll bar for Visual Studio, this answer worked for me. I am using VS 2022 also – Rob Scott Mar 16 '22 at 21:19
2

View --> Show Minimap -click it to uncheck it-

2

Just to update the situation, in the past the settings mentioned above worked, despite showing an unknown configuration error, after a reload, because they had not been officially exposed to users. With v1.58 these settings will be "official" and not require a reload.

editor.scrollbar.vertical - 'auto' | 'visible' | 'hidden'
editor.scrollbar.horizontal - 'auto' | 'visible' | 'hidden'
editor.scrollbar.verticalScrollbarSize - number
editor.scrollbar.horizontalScrollbarSize - number
editor.scrollbar.scrollByPage - boolean

See Expose editor scrollbar options and react to them being updated.

Mark
  • 143,421
  • 24
  • 428
  • 436
1

As of Version 1.79.0-insider it's:

View > Appearance > Minimap

enter image description here

Chuck D
  • 1,629
  • 2
  • 16
  • 32
0

once you go to the user setting it has default setting left had side as bellow and there is a pensile mark on where click and automatically appear true false then right had side custom setting change. Thats how I did it thanks Alexandru. think this may help you.

enter image description here

Prageeth godage
  • 4,054
  • 3
  • 29
  • 45
0

Default value of Scroll Beyond Last Column is 5 which does horizontal scrollbar visible and operate. Set the value to 0 removes horizontal scrollbar.

Settings options

MarekM
  • 1
0

for hidden scroll bar add into setting.json

`"window.scrollBarVisibility": "hidden",`

for hidden minimap add :

"editor.minimap.enabled": false,
0

For all projects

Write to a search settings:

write "scrollbar" to a search settings

Then change this values as on screenshot:

change vertical and horizontal values to hidden or 0 accordingly