Vscode: Feature: Setting to hide Vertical Scroll-Bar when the Minimap is Visible

Created on 13 Jun 2017  Â·  17Comments  Â·  Source: microsoft/vscode

Please can we have a setting to hide the vertical scroll-bar if the very awesome minimap is visible? With the minimap there, the vertical scroll-bar is just a waste of space.

capture

It would also be very cool to show the current view-area in the minimap by changing its background colour in that region - like full-fat Visual Studio.

editor-minimap feature-request

Most helpful comment

@jonasagx Thanks for the hint! This alone did the trick for me!

"editor.scrollbar.verticalScrollbarSize": 0

All 17 comments

@alexandrudima
I would be glad to do a PR on this to add a configuration option HideVerticalScrollbar ?

There is already a "hidden" option "editor.scrollbar.vertical": "hidden", but that just hides the scrollbar, but the overview ruler is still there and the minimap still leaves space for it. I would say it is a good idea to add an option to remove the vertical scrollbar, but only after we render other adornments in the minimap. e.g. errors, find matches, etc. all other stuff that renders today in the overview rule. But this needs to be implemented in a smart way, possibly via a secondary transparent canvas on top of the minimap such that repainting these adornments does not result in repainting the minimap. Furthermore, I think there are some issues with the EditorLayoutInfo which is "leaky" and could use some improvements. i.e. some view code still ends up computing stuff, which I don't really like. e.g.. I plan to make some refactorings in the area to encapsulate such math inside the EditorLayoutInfo. So ... a PR is welcome, but a lot of care must be taken because the layout is "leaky".

@alexandrudima
Thanks for the detailed response/issue comments !
I've started looking at the code, and as I you've pointed out it's more complicated
then at first blush. I did one of my first PR 's for expanding and contracting views
so I got into some of the layout code and calculation issues. I've also been working on a drop-down improvement delving into layout and UI issues. I could look into this more
But because you talk about re- factoring would it be better to wait or is it helpful
to do some preliminary work?
FYI I could not find anything either in the code or configuration that matched
editor.scrollbar.vertical
thanks Christopher

@alexandrudima «There is already a "hidden" option "editor.scrollbar.vertical": "hidden"» It looks like that this option is deprecated — can't find this one.

Can confirm, "editor.scrollbar.vertical": "hidden", is no longer working. Getting an 'unknown configuration setting'. Same for "editor.scrollbar.horizontal": "hidden".

Confirmed about "editor.scrollbar.vertical": "hidden" too. Can't find this one.

Also hope to see this option. When minimap enabled vertical scrollbar is basically redundant and doesn't help anything except distracting.

The option was detected as "unknown configuration setting" but when I restarted vscode it worked.

  1. you need to reload vscode for the changes to take place
  2. i combined these two settings to hide my scroll bar:
    "editor.scrollbar.vertical": "hidden",
    "editor.scrollbar.verticalScrollbarSize": 1

@jonasagx Thanks for the hint! This alone did the trick for me!

"editor.scrollbar.verticalScrollbarSize": 0

@jonasagx Unfortunately, this doesn't work if the purpose of hiding the scrollbar is to recover horizontal space.

It appears that the editor still reserves the space even if you make the scrollbar disappears (I counted the number of characters that can fit before causing the horizontal scrollbar to appear, and they were the same even when you hide the vertical scrollbar).

If there is ever an official option to hide the vertical scrollbar, then I hope this gets fixed!

Could the very useful hidden setting "editor.scrollbar.verticalScrollbarSize": 0 be promoted to available? At least for people who don't want all the bells and whistles from the regular scrollbar. Having it hidden is obviously had for discoverability and also gives a strong hint of deprecation...

2019 now, any plan?

@wzxu thanks,

"editor.scrollbar.verticalScrollbarSize": 0

worked for me.

@wzxu thanks,

"editor.scrollbar.verticalScrollbarSize": 0

worked for me.

The tooltip says "Unknown Configuration Setting", but it works.

Nothing really to add, but I agree that having both the minimap and the scrollbar is redundant and wasting space. I don't even care if the minimap does not yet have all the indicators as the scrollbar does, as long as I can still scroll with just the minimap present then I'd at least like the option to disable the scrollbar and reclaim the horizontal space it occupied.

Using VS Code v1.44.0 on Windows 10 and using the option mentioned earlier ("editor.scrollbar.verticalScrollbarSize": 0) not only removed the scrollbar but also gives back that horizontal space. And it doesn't require a restart. Looks like it's been secretly implemented in full!

Was this page helpful?
0 / 5 - 0 ratings